Posted on: 9/21/2012 1:18:32 AM | Views : 209

Hi.........
I am using asp.net 4.0 with C#. I am trying to send mail from my web application which is working fine in local but after deployment its not working. 
I am using the following code:-

MailMessage message = new MailMessage(); message.IsBodyHtml = true; SmtpClient client = new SmtpClient(); message.From = new MailAddress(fromAddress.ToString ()); message.To.Add(new MailAddress(toAddress)); message.Subject = subject; message.Body = messageBody; client.Host = "SMTPServerName"; //put your SMTP server address client.Port = 25; // put your smtp port number client.UseDefaultCredentials = true; client.Credentials = new System.Net.NetworkCredential("mail id", "password"); client.Send(message);
please help regarding this problem.


...

Go to the complete details ...