MSBuild.ExtensionPack.Communication.Email Body

Jan 27, 2011 at 9:28 PM

How can I have a more complicated Body tag for an email?  Specifically i am looking for newline characters and HTTP web links to server.

Thanks

Scott

Coordinator
Jan 27, 2011 at 10:30 PM

Set Format="HTML" and escape your content, e.g.

Body="Line1 <br/>Line2 Link <a href='http://www.freetodev.com'>mike</a>" Format="HTML"

Note I have some updates going into the email class to allow the specifying of more properties, e.g. Port etc. Should be in soon...

 

Mike

Coordinator
Jan 27, 2011 at 11:01 PM

Updates checked in: http://msbuildextensionpack.codeplex.com/SourceControl/list/changesets

 

May 31, 2013 at 8:22 PM
Edited May 31, 2013 at 8:23 PM
Here's another approach. I wish I knew how to get a prettier format for the email, though...
      <PropertyGroup>
        <TF><br/></TF>
      </PropertyGroup>
      <ItemGroup>
            <!-- Specify some attachments -->         
            <Attachment Include="$(SolutionRoot)\TestResults\*.*"/>
            <!-- Specify some recipients -->
            <Recipient Include="x@x.com"/>
            <BodyText Include="BuildNumber: %(BuildInfo.BuildNumber)" />
            <BodyText Include="$(TF) Test Status: %(BuildInfo.TestStatus)" />
            <BodyText Include="$(TF) Drop Location: %(BuildInfo.DropLocation)" />
            <BodyText Include="$(TF) Requested By: %(BuildInfo.RequestedBy)"/>
            <BodyText Include="$(TF) Last Changed On: %(BuildInfo.LastChangedOn)" />
            <BodyText Include="$(TF) Shelveset Name: %(BuildInfo.ShelvesetName)" />
      </ItemGroup>
        <MSBuild.ExtensionPack.Communication.Email TaskAction="Send" Subject="$(BuildDefinitionName) Test Results" SmtpServer="xxx.xxx.com" MailFrom="xxx@xxx.com" MailTo="@(Recipient)" Body="@(BodyText)" Attachments="@(Attachment)"/>
Marked as answer by mikeFourie on 10/9/2013 at 3:16 PM