title: emailext - should send email only if html report is available else should not email
body: <p>My goal is  -- Very often <strong>emailext</strong> sends emails with error messages like</p>
  
  <blockquote>
    <p>ERROR: File 'path/to/index.html' does not exist</p>
  </blockquote>
  
  <p>My code looks like this</p>
  
  <pre><code>emailext(to: 'jane.doe@foo.com',
          subject: 'Build report',
          mimeType: 'text/html',
          body: '${FILE,path="path/to/index.html"}',
  )
  </code></pre>
  
  <p>This error message is correct. There was no html report produced. But I want this email to be sent out only if there is an html report and to <strong>not</strong> send error messages when there is no html report.</p>
  
  <p>Any ideas on how to achieve this behavior?</p>
  
  <p>Thanks much!</p>