title: Jenkins pipeline email not sent on build failure
body: <p>I am using following step in my pipeline jenkins job:</p>
  
  <pre><code>step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'my@xyz.com', sendToIndividuals: true])
  </code></pre>
  
  <p>But no email was sent when the build failed (i.e. error). Any pointers why?</p>
  
  <p>P.S. Emails can be sent from this server, I have tested that.</p>