i'm trying to send email from web Application deployed in Godaddy Windows 2012 Vitual Private Server.
Error Displayed "Server actively refused the connection".
Email send from my local system, but outgoing email is not working on Godaddy Hosting.
using (var smtp = new SmtpClient()) {
var credential = new NetworkCredential {
UserName = "user@outlook.com",
Password = "password" };
smtp.Credentials = credential;
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
await smtp.SendMailAsync(message);
return RedirectToAction("Sent");
}