code to send email
- by Alexander
What am I doing wrong here?
private void SendMail(string from, string body)
{
string mailServerName = "plus.pop.mail.yahoo.com";
MailMessage message = new MailMessage(from, "[email protected]", "feedback", body);
SmtpClient mailClient = new SmtpClient();
mailClient.Host = mailServerName;
mailClient.Send(message);
message.Dispose();
}
I got the following error:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 209.191.108.191:25