This project is read-only.

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.



Jan 27, 2011 at 10:30 PM

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

Body="Line1 <br/>Line2 Link <a href=''>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...



Jan 27, 2011 at 11:01 PM

Updates checked in:


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...
            <!-- Specify some attachments -->         
            <Attachment Include="$(SolutionRoot)\TestResults\*.*"/>
            <!-- Specify some recipients -->
            <Recipient Include=""/>
            <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)" />
        <MSBuild.ExtensionPack.Communication.Email TaskAction="Send" Subject="$(BuildDefinitionName) Test Results" SmtpServer="" MailFrom="" MailTo="@(Recipient)" Body="@(BodyText)" Attachments="@(Attachment)"/>
Marked as answer by mikeFourie on 10/9/2013 at 3:16 PM