Msbuild Send Email SMTP Server
<
Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets ="EmailIt">
<Import Project="c:\sdc\Microsoft.Sdc.Common.Tasks" />
<
PropertyGroup >
<
MsgFailed>Failed Email for </MsgFailed>
<
MsgSuccess>success Email for </MsgSuccess>
</
PropertyGroup>
<Target Name="EmailIt" >
<Email MailTo="abc@ms.com"
MailFrom="sundar@ms.com"
SmtpServer="EmailSMTPServer.ms.com or Ip address of the server"
Subject=" Build status Today"
Body="Hi All,<BR/>
Today’s Daily Build and Deployment Completed:
<BR/><BR/>
Format="HTML"
Attachments="$(ResultsItem)$(BuildLogZip)"
/>
<OnError ExecuteTargets ="HandleErr"/>
</Target>
<Target Name="HandleErr" >
<Message Importance ="high" Text ="$(MsgFailed) : " ContinueOnError ="true" ></Message>
</
Target>
</
Project>
Comments
- Anonymous
July 30, 2008
PingBack from http://blog.a-foton.ru/2008/07/msbuild-send-email-smtp-server/ - Anonymous
July 11, 2011
Can u all please give me the full source code of this projet to get me an idea.