title: Email MSBuild errors - only when there are errors
body: <pre><code> msbuild MyProject.proj /fl /flp:v=detailed;logfile=mylog.txt
   msbuild MyProject.proj /t:ErrorEmail 
  </code></pre>
  
  <p>I have implemented this, and it works when there are errors. 
  But it's also sending an email when there are no errors. 
  How can I set up a condition if the file is empty, or there are 0 line count in the ReadLinesFromFile? </p>
  
  <pre><code>&gt; &lt;Target Name="ErrorEmail"&gt;    
  &gt;   &lt;ReadLinesFromFile
  &gt;       File="mylog.txt"
  &gt;       Lines="_ErrorLines"
  &gt;       /&gt;
  &gt;   &lt;MSBuild.Community.Tasks.Mail
  &gt;       SmtpServer="mailhost.amsa.com"
  &gt;       To="$(ErrorEmails)"
  &gt;       From="$(FromEmail)"
  &gt;       Subject="Build failure for $(SolutionName)" 
  &gt;       Body="Error details: @(ErrorFileContents, '%0D%0A')"
  &gt;       /&gt;
  &gt;  &lt;/Target&gt;
  </code></pre>