Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 27th, 2004, 08:12 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default email in asp

hi guys ! out there.....
    i have a doubt in email...
Is Their exist any method other than CDONTS to send mail in asp using vbscript.

       i used CDONTS but getting error at "Server.CreateObject("CDONTS.NewMail")
                i don't know how to check whether CDONTS installed or Not.. I Have Windows2000 with IIS 5.0

           if any other exists Plz Be Explanatory about it...

and if Any way to check and use CDONTS plz be forward with u'r Answers.....

Thanx In Advance...
Bye For Now...

     "Disaster Leads To Acheivements"-Hope 2005 Be Achieving Year"
                  -Pray For The TSunami Affectors----
                            "Only God Can Give Peace"


MuthuKumar.AL
__________________
MuthuKumar.AL
 
Old December 27th, 2004, 12:37 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Does it work when you drop Server. from the CreateObject statement?

If you use this code in a VBS file, there is no such thing as a "server"....

Cheers,

Imar
 
Old December 28th, 2004, 03:08 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
     Even By Droping Server I am Meeting with the same Errors..
    The Error Type Is
                   "Error Type:
Server object, ASP 0177 (0x8007007E)"
Plz I need the Solution...

Where to check For CDONTS..
How To Ensure Whether SMTP is INStalled Properly..

Give Me The Code For Working CDONTS and CODE for Other Possible Email Options..

Bye For Now..
          "Pray God -"Only He Can Give Peace"
                  -TSunami Shocked India ...


MuthuKumar.AL
 
Old December 28th, 2004, 03:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you post *your* code from the VBS file? There may not be a problem with CDO, but with the code.

Cheers,

Imar
 
Old December 28th, 2004, 06:29 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar! I am Doing In ASP. I am Not Concerned with VBS File. Is That We can do only in vbs..

 I am dealing with ASP..
Imar I need A help Plz Do Me If U Know In asp Plz


MuthuKumar.AL
 
Old December 28th, 2004, 06:42 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, sorry, I misunderstood you. For some reason I thought you were dealing with an VBS file. Don't know why.

Anyway, check out this FAQ: http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=249

Take a look at the second section of the article titled: "Using the Collaboration Data Objects to Send E-mail". Does that work for you?

If not, can you post the code you're using?

Imar
 
Old December 29th, 2004, 09:23 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

*****Code snippet STARTS here*****
<%@ language= "VBscript" %>
<% Option Explicit


Dim NewMail
Set NewMail = Server.CreateObject("CDONTS.NewMail")

NewMail.To= "[email protected]"
NewMail.From= "[email protected]"
NewMail.Subject = "hey sneha"
NewMail.Body = "Hi there, just wanna know wheather you got my new year gift!!"
NewMail.Bodyformat=0
NewMail.Mailformat=0
NewMail.Send

Set NewMail=Nothing
%>
*****Code snippet ENDS here*****


Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old December 29th, 2004, 09:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

This code requires a local SMTP server (running on the same machine as the ASP page). Do you have such a server?

Also, did you try my other code with the Collaboration objects??

Cheers,


Imar
 
Old December 30th, 2004, 02:11 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi thanx for replies but i am zero in Hardware or system information so plz guys tell me how to check whether local smtp server is present or not. as i do not know to check for availability.
       the other code snippet regarding collaboration object as suggested by imar it requires the remote smtp server address and the smtp info. so i left out.

 plz guys help me to grow..
  Thanx


MuthuKumar.AL
 
Old December 30th, 2004, 05:48 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can't just leave that out. The whole point of that code is that you can point to a SMTP server that doesn't run locally.

For the info, you'll need to contact your system administrator, or your ISP. Alternatively, look in your e-mail program and see how things are set up there.

At the end of the article, there is a link to an article that explains how to set up an SMTP server. Did you read that article?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multipart email in ASP takabyte Classic ASP Professional 0 October 25th, 2007 05:52 PM
Email in asp.net asif_sharif ASP.NET 1.0 and 1.1 Professional 4 September 21st, 2006 07:31 AM
ASP EMAIL tommyt ASP.NET 1.0 and 1.1 Basics 1 June 20th, 2006 10:31 PM
Email in asp.net asif_sharif ASP.NET 1.0 and 1.1 Basics 0 January 3rd, 2006 11:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.