try
{
MailMessage m = new MailMessage("[email protected]", "[email protected]", "Situação", "Oi, tudo bem?");
SmtpClient smtp = new SmtpClient("smtp.live.com", 587);
smtp.Credentials = new NetworkCredential("[email protected]", "xxxx");
smtp.EnableSsl = true;
smtp.Send(m);
Console.WriteLine("sucesso");
}
catch (SmtpException ex)
{
Console.WriteLine(ex.Message);
}
finally
{
Console.ReadKey();
}
whats wrong in here please? its join in catch and say Failure sending email