I have a goal in my build script that will send an email with an attachment detailing the svn changes for the module.
This works if I hard-code a single email address, but now I want to send several emails to several developers, and the script does not work. Below is the code
<Target Name="MailInformationUpdate" DependsOnTargets="ZipArtifact" Condition="!Exists('BUILD_IS_PERSONAL')">
<ReadLinesFromFile File="$(BuildDir)\$(recipientListFileName)">
<Output PropertyName="Recipients" TaskParameter="Lines"/>
</ReadLinesFromFile>
<Mail SmtpServer="$(smptServer)"
To="@(Recipients)"
From="$(senderEmail)"
Body="Attached is a list of the changes made since the last release. "
Subject="This module has been updated. You may wish to update." Attachments="$(BuildDir)\Builds\$(svnChangeFileName)"
/>
</Target>
If I changed the To line to read $ (Recipients), the first person on the list will receive an email, subsequent addresses will not receive an email.
Then I changed the To line to what you see below @ (Recipients), since I could then go around each recipient. There is no such luck !!! I get an error
Emailing "{0}".
<path> error : A recipient must be specified.
, , - ( 1), ( 2) ..