Last post Jul 02, 2017 10:30 PM by markfitzme
Jun 28, 2017 09:41 AM|mamidi234|LINK
I am sending mail using godaddy mails in my project its continuously loading after some time it shows one message The operation timed out.
this my web.config code
<smtp deliveryMethod="Network" from="firstname.lastname@example.org">
<network host="smtpout.secureserver.net" port="25" userName="email@example.com" password="1a1212"/>
this is my .cs code
MailMessage mail = new MailMessage();
mail.From = new MailAddress("firstname.lastname@example.org");
mail.Subject = "Mail From Admin...";
Literal ltrlBody = new Literal();
ltrlBody.Text = "<font color=red>*** This is an auto generated mail. Please do not reply ***</font>";
mail.Body = ltrlBody.Text;
mail.IsBodyHtml = true;
mail.Priority = MailPriority.High;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.EnableSsl = true;
smtp.Host = "smtpout.secureserver.net";
smtp.UseDefaultCredentials = false;
NetworkCredential credentials = new NetworkCredential("email@example.com", "1a1212");
smtp.Credentials = credentials;
catch (Exception ex)
lblerr.Text = ex.Message;
ScriptManager.RegisterStartupScript(this, this.GetType(), "err_msg", "alert('message'+ ex.Message);", true);
If any reason or solution are have please tell me asap.
Thanks in advance.
Jun 28, 2017 11:53 AM|PatriceSc|LINK
The server name is correct? Seems other posts are using relay-hosting.secureserver.net instead ? BTW it happens when running on GoDaddy ?
You could store setttings in web.config using
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/network/smtp-element-network-settings so that you can change them on the fly depending on your deployment and have something that works both locally for example with Outlook or
Gmail and when hosted on GoDaddy with their own SMTP server.
Jul 02, 2017 10:30 PM|markfitzme|LINK
Also check the port. I can't remember but I always thought GoDaddy used alternate ports.