hi all, i m using follwoing code to send mails from my website, but it returns an error "Mail send failure. Error was Connection timed out." please help Set Mailer = Server.CreateObject("Persits.MailSender") Mailer.Host = "mail.jmit.ac.in" Mailer.Username = "[email protected]" Mailer.Password = "12345" Mailer.FromName = "[email protected]" 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
.net mail not working i m geeting following error when sending mail from my website: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.53.121:25 -----------------code------------------- <%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.Net.Mail" %> <script language="C#" runat="server"> protected void Page_Load(object sender, EventArgs e) { //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress("[email protected]"); mail.To.Add("[email protected]"); //set the content mail.Subject = "This is an email"; mail.Body = "This is from system.net.mail using C sharp with smtp authentication."; //send the message SmtpClient smtp = new SmtpClient("mail.jmit.ac.in"); NetworkCredential Credentials = new NetworkCredential("[email protected]", "*********"); smtp.Credentials = Credentials; smtp.Send(mail); lblMessage.Text = "Mail Sent"; } </script> <html> <body> <form runat="server"> <asp:Label id="lblMessage" runat="server"></asp:Label> </form> </body> </html> -------------end code------------------
I tried to ping mail.jmit.ac.in and it timed out. When I checked your zone record mail.jmit.ac.in does not exist. Did you removed that A record from the DNS server? I see that you are not using Winhost email servers for email, and you are using Google's email server. You'll need to check with Google and see what SMTP server you can use to send out your email with your web application.
Check the and ping mail.mail.jmit.ac.in. It is not resolving to any IP address. If you are not going to use Winhost email server and are planning to use a 3rd party email server such as Google's you will need to contact them to verify what SMTP server you can use to relay out email through them.
You are going to speak with your network administrator about this. It looks like something in your local network is caching mail.jmit.ac.in to point to this IP address 72.14.221.203. This is not Winhost. This is somebody else.