cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to send email via C# code

Hello All,

 

Before 5 hour i write C# code to send email and all things is work , but after 5 hour , when i send any email i have this issues 

 

"The operation has timed out."

 

and this is my code 

 

using (SmtpClient client = new SmtpClient("smtpout.secureserver.net"))
{
client.Credentials = new NetworkCredential("<My Email >", "<Password>");
client.EnableSsl = false;

System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
mail.From = new MailAddress("<My Email >");
mail.To.Add("<Send email to>");

mail.Subject = "emailSubject";
mail.Body = "emailBody";
mail.IsBodyHtml = true;
client.Timeout = 10000;
client.Send(mail);
}

 

 

Any Help?

1 REPLY 1

Re: Unable to send email via C# code

thank you