sending email in asp

Reply

Join Date: Feb 2008
Posts: 17
Reputation: vipinsgangwar is an unknown quantity at this point 
Solved Threads: 0
vipinsgangwar vipinsgangwar is offline Offline
Newbie Poster

sending email in asp

 
0
  #1
Jul 31st, 2008
Hi,
Ihave to send an email from my application.
I am using CDONTS to send it.

The code is as follows:

  1. Dim objCDOMail
  2. Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
  3. objCDOMail.From = "abc"
  4. objCDOMail.To = "myemailid@gmail.com"
  5. objCDOMail.Subject = "Enquiry sent from my web site"
  6. objCDOMail.BodyFormat = 0
  7. objCDOMail.MailFormat = 0
  8. objCDOMail.Body = "<h2>Hello</h2><br><b>This is my e-mail in HTML format</b>"
  9. objCDOMail.Importance = 1
  10. objCDOMail.Send
  11. Set objCDOMail = Nothing
I am getting no error. But the mail is also not reaching up to the destination.

can any body help me.
thanks in advance
Last edited by Tekmaven; Jul 31st, 2008 at 6:33 am. Reason: Code tags
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 25
Reputation: whisper_101 is an unknown quantity at this point 
Solved Threads: 0
whisper_101 whisper_101 is offline Offline
Light Poster

Re: sending email in asp

 
0
  #2
Aug 9th, 2008
Hi

Try This:

  1. <%
  2.  
  3. Dim MyCDONTSMail
  4.  
  5. Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
  6.  
  7. MyCDONTSMail.From= "abc"
  8.  
  9. MyCDONTSMail.To= "myemailid@gmail.com"
  10.  
  11. MyCDONTSMail.Subject="Enquiry sent from my web site"
  12.  
  13. MyBody = MyBody ="Hello"
  14.  
  15. MyCDONTSMail.Body= MyBody
  16.  
  17. MyCDONTSMail.Send
  18.  
  19. set MyCDONTSMail=nothing
  20.  
  21. %>
Last edited by peter_budo; Aug 9th, 2008 at 1:32 pm. Reason: Correcting code tags, please use as follows [code]YOUR CODE HERE[/code]
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC