Outgoing Email Sending Issue in Godaddy Windows 2012 VPS -


i'm trying send email web application deployed in godaddy windows 2012 vitual private server.

error displayed "server actively refused connection".

email send local system, outgoing email 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");  } 

firstly, try adding:

smtp.usedefaultcredentials = false;   

before:

smtp.credentials = credential; 

since june of 2016, gmail changed dmarc policy p="none" p="reject".

any emails sent using address ending @gmail.com, have originate within gmail's infrastructure.

you need use email sending service, such sendgrid (www.sendgrid.com) or mailgun (www.mailgun.com).

you should using 1 of these anyway, keep off spam blacklists , provide lots of other benefits, including details of showing if emails have been blocked due bad email addresses, spam reports, etc.

more information on dmarc , how works available in article on sendgrid blog.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -