Help with ExtensionPack's Email task

Jul 3, 2012 at 2:04 PM

Hi All,

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="vaibhavpanghal@gmail.com" MailTo="vaibhavpanghal@gmail.com" Body="body text" UseDefaultCredentials="false" UserName="vaibhavpanghal@gmail.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 173.194.77.109

It's becoming really frustrating. Any ideas anyone?

Thanking in anticipation.

Aug 6, 2013 at 9:43 AM
I got the same error with you :

D:\XuKai\msbuild\SW_SRC\CommonLibraries\ExtensionPack\4.0\Samples\Email meliu.p
roj(16,9): error : SmtpException: Failure sending mail.\r

D:\XuKai\msbuild\SW_SRC\CommonLibraries\ExtensionPack\4.0\Samples\Email meliu.p
roj(16,9): error : WebException: Unable to connect to the remote server\r

D:\XuKai\msbuild\SW_SRC\CommonLibraries\ExtensionPack\4.0\Samples\Email meliu.p
roj(16,9): error : SocketException: An attempt was made to access a socket in a
way forbidden by its access permissions 10.96.66.21:25\r

D:\XuKai\msbuild\SW_SRC\CommonLibraries\ExtensionPack\4.0\Samples\Email meliu.p
roj(16,9): error :

I have resolve it by set the authority of virus software or shut it .
Marked as answer by mikeFourie on 10/9/2013 at 3:14 PM