Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AspMail

Status
Not open for further replies.

01310564

Programmer
Oct 9, 2003
96
GB
Hi
I have used the following code in an asp page to generate an e-mail from an asp page. The problem is that it ain't generating any e-mail and i'm not getting any errors either.


<%
set objNewMail = createObject("CDONTS.Newmail")
objNewMail.from = <e-mail Address>
objNewMail.to = <e-mail Address>
objNewMail.subject = "This is a test"
objNewMail.body = "please tell me if you receive this!"
objNewMail.send
%>


Can anyone help?

Cheers,

Hugh
 
This is the ASP mail code that works fine on my website:

Username and Email are previously defined variables

<%
dim objMail
set objMail = Server.CreateObject("SMTPsvg.Mailer")
objMail.RemoteHost = "mrvnet.kundenserver.de" ' Specify a valid SMTP server
objMail.FromAddress = "you@wherever.co.uk" ' Specify sender's address
objMail.AddRecipient Username, Email 'Specify recipient
objMail.Subject = "whatever"
objMail.BodyText = "Blah Blah"
objMail.SendMail
%>
 
make your first line

set objSendMail = server.createobject("CDONTS.NewMail")

you don't have server.createobject and i think thats the problem,

also in that font are those . (stops) or , (commas) although i think its just the font

Cheers

daveJam

*Is this where we put the lonely hearts bit*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top