Author: ghouse1982 | Posted on: 6/8/2009 6:19:27 AM | Views : 384

Hi all I am stuck in a problem trying to send email. I am geting err The Operation has timed out. Here is my code
Web.config
<mailSettings>
 <smtp>
  <network host="<IP address>"  port="25" userName="" password="" defaultCredentials="true"/>
 </smtp>
</mailSettings>
.cs code
MailMessage MyMessage = new MailMessage();
SmtpClient emailClient = new SmtpClient();
int i = 0;
MailAddress SendFrom = new MailAddress(strFrom)
MailAddress SendTo = new MailAddress(strTo);
 MyMessage.From = SendFrom;
 string[] SendToArray = new string[1000];
 SendToArray = strTo.Split(',');
 for (i = 0; i <= SendToArray.Length - 1; i++)
 {
       MyMessage.To.Add(SendToArray[i].ToString());
 }
  ...

Go to the complete details ...