I am trying to use the email task but I am unable to send mail. I using the following configuration <MSBuild.ExtensionPack.Communication.Email TaskAction="Send" Subject="Test Email" SmtpServer="smtp.gmail.com" MailFrom="email@example.com"
MailTo="firstname.lastname@example.org" Body="body text" UseDefaultCredentials="false" UserName="email@example.com" UserPassword="mypassword" EnableSsl="true" Format="HTML" />
With port 465 it gives smtp time out error and with port 587 or no port specified it gives the following error -
SmtpException : Failure sending result.
WebException : Unable to connect to the remote server. SocketException : An attemp was made to access a socket in a way forbidden by its access permissions 126.96.36.199
It's becoming really frustrating. Any ideas anyone?
Thanking in anticipation.