sending mail using classic asp

Discussion in 'Site Programming, Development and Design' started by bsgrewal, May 27, 2010.

  1. hi all

    i was trying to send mail using asp, it returns error "connection timeout".
    follwoing is my code:

    __________________Code_________________

    <html>
    <head>
    </head>
    <body>
    <%

    Set Mailer = Server.CreateObject("Persits.MailSender")
    Mailer.Host = "mail.mydomain.com"
    Mailer.Username = "[email protected]"
    Mailer.Password = "*******"
    Mailer.FromName = "TIMT"
    Mailer.From= "[email protected]"
    Mailer.AddAddress "[email protected]"
    Mailer.Subject = "This is a sample email sent from Persits ASPEMail"
    Mailer.Body = "Congratulation" & VbCrLf & "If you receive this is, your mail component works"

    ' catch errors
    On Error Resume Next

    Mailer.Send

    If Err <> 0 Then ' error occurred
    Response.Write "Mail send failure. Error was " & Err.Description
    else
    Response.Write "Mail sent..."
    End If

    %>
    </body>
    </html>
    _______________End Code________________

    please advice.

    Thanks
     
  2. is Mailer.Host = "mail.mydomain.com" actually how it is in your code or did you just put mydomain to not show us your domain?
     
  3. Ray

    Ray

    mail.mydomain.com is obviously an example. You will replace mydomain.com with your actual domain name set on your account.
     

Share This Page