Gmail smtp server does that. It's a spam prevention protocol. If you send out too many emails that triggers their algorithm, it'll block you for a day.
Try again tomorrow or use another smtp server
Marked as answer by Mark - MSFT on Mar 06, 2013 05:56 AM
Bbaale
Member
64 Points
80 Posts
Failed to send mail
Feb 27, 2013 06:09 PM|LINK
Before I used this same code to send email via gmail but now it doesnot send.
It brings this error
The operation has timed out.
//Code I use to send mail.
MailMessage mm = new MailMessage();
SmtpClient smtp = new SmtpClient();
mm.From = new MailAddress("bbaale.emmy@gmail.com");
mm.To.Add(new MailAddress("bbaale.emmy@yahoo.com"));
mm.Subject = "Testing";
MailMessage mail = new MailMessage();
mm.Body = "Message Body";
mm.IsBodyHtml = true;
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();
NetworkCred.UserName = "************@gmail.com";
NetworkCred.Password = "*********";
smtp.Credentials = NetworkCred;
smtp.Port = 465;
smtp.Send(mm);
Response.Write("Order sent sucessfully");
What Am I missing?
adamturner34
Contributor
3890 Points
971 Posts
Re: Failed to send mail
Feb 27, 2013 07:16 PM|LINK
Yeah,
Gmail smtp server does that. It's a spam prevention protocol. If you send out too many emails that triggers their algorithm, it'll block you for a day.
Try again tomorrow or use another smtp server