|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
HTML email using CDONTS
hi to all,
guys am really stuck at 1 point ive ben tryin since long to send this HTML email but just cud not get ne success the codes are as below sub sennewusermail (susername, susermail, fhtml) dim newmailobj dim smailbody setnewmailobj=createobject("cdonts.newmail") newmailobj.from="sumeet@sumeet.com" newmailobj.to="sumicooldude@rediffmail.com" newmailobj.subject="An HTML email" newmailobj.bodyformat=cdobodyformatHTML newmailobj.mailformat=cdomailformatMIME newmailobj.contentbase="http://members.rediff.com/sumicooldude" newmailobj.contentlocation="http://members.rediff.com/sumicooldude/images" smailbody="<html><title>An HTML email</title><body bgcolor=red><img src=http://members.rediff.com/sumicooldude/images/banner.gif><br><a href=http://www.rediff.com>Click</a></body></html>" newmailobj.body=smailbody newmailobj.send set newmailobj=nothing end sub response.write ("mail sent") can nebody plz chk wat the prob is as this code is not even showing ne error regards Sumeet |
|
#2
|
|||
|
|||
|
Instead of me trying to explain what probably are wrong, try these two links and I'll think you will have a HTML email up and running soon.
http://www.devasp.com/Samples/mail.asp http://www.devasp.com/Samples/Mail3.asp |
|
#3
|
|||
|
|||
|
try using server.createobject (instead of just createobject)
use 0 for the bodyformat and 0 for mailformat |
|
#4
|
|||
|
|||
|
Check whether your SMTP server is running properly. OR set ur mail server as SmartHost in IIS.
To Configure the Smart Host, Open IIS Open the tree for your server. Right-click Default SMTP Virtual Server, and then click Properties. Locate the Delivery tab, and then click Advanced. Type the name of your SMTP mail server in the Smart Host text box. If you do not know the name of your SMTP mail server contact your mail administrator. Make sure that the Simple Mail Transfer Protocol (SMTP) service is running. The SMTP service is part of the IIS Admin Service. Therefore, the IIS Admin Service must also be running. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > HTML email using CDONTS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|