#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Question ASP Email Not working


    Hi - I have develped a web site. When the user registers a confirmation mail will be sent to the users mail id. Initially it was working well. Since 3 days this is not working. I did not make any chages. The mail id entered is also correct.

    Code


    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From="mymail@mydomain.com"
    myMail.To="bullsb@gmail.com"
    myMail.TextBody="Thanks for registering"
    myMail.Send
    set myMail=nothing

    Can any one assist me in this please
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,424
    Rep Power
    4539
    Add some code to test if the send method completed without error. I don't use CDO but you should be able to find something with google.

    Also read the from mailbox with a mail client check for any bounce messages. And check your mail logs they should help you identify problems.
    ======
    Doug G
    ======
    The man who doesn't read good books has no advantage over the man who can't read them.
    --Mark Twain
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    It's also possible to surround that code with exception handling to trap errors and see what error is occuring (if one is).

    just google "exception handling classic asp" and you'll see different approaches to that.

IMN logo majestic logo threadwatch logo seochat tools logo