MSBuild.ExtensionPack.Communication.Email

Jan 13, 2011 at 10:41 PM

Hi Mike,

 

I am having problems using the "Email" task. I get "SmtpException: The operation has timed out" whenever I try to send an email. I created a vbs script to send an email to the same server and it works.

 

<MSBuild.ExtensionPack.Communication.Email TaskAction="Send" 
                                               Subject="Email Subject"
                                               SmtpServer="smtp.myserver.com"
                                               MailFrom="teamfoundation@company.noreply"
                                               MailTo="me@myemail.com"
                                               Body="Email Body"
                                               
                                               />

 

Thanks

Coordinator
Jan 14, 2011 at 4:38 PM

running as the same user?

Can you show me the full log with /v:diag

Are you able to run the code in debug in VS?

 

Mike

Jan 14, 2011 at 4:49 PM

Hi Mike, thanks for the reply.

I'm sorry, I do not understand what you meant by /v:diag. Can you please tell me how?

To clarify my issue, I am running into issues having my build send out an email using the email task. I thought maybe that it has something to do with my server or network settings and etc (anti virus..) so I wrote a simple vbs script to check if I can send out an email using our company's email server. I was able to send out emails from the vbs script so I thought my setup was fine....

 

Thanks again

 

Coordinator
Jan 14, 2011 at 5:00 PM

Is this on a TFS Server? Remember that the build will be running under the identity of a different user to yourself, so it may be security related.

If its TFS 2008 or5, I think you can justpass in /v:diag as a property when you start the build. If its not TFS, then just add it as an argument when you run the file, e.g.

msbuild yourfile.proj /v:diag

 

Mike