title: Jenkins send email notification only if last N builds have failed (not per run) - Editable Email Notification
body: <p>Jenkins 1.6 - 2.x</p>
  
  <p>I have a job which runs every minute or 2 and sometimes the build fails and the next builds passes. For build failures, I'm using <strong>Editable Email Notification</strong> plugin in Jenkins. </p>
  
  <p>Either using this plugin or any other plugin/way, can I somehow configure Jenkins job to send me a failed build notification ONLY if the last 3 consecutive builds have failed? It's no fun to watch these builds fail and then succeed in the next run so I'm trying to reduce the frequency of such failure notifications OR make it more intelligent.</p>
  
  <p>I have mentioned a comment for a new feature request here:
  <a href="https://wiki.jenkins.io/display/JENKINS/Email-ext+Template+Plugin?focusedCommentId=132940540#comment-132940540" rel="noreferrer">https://wiki.jenkins.io/display/JENKINS/Email-ext+Template+Plugin?focusedCommentId=132940540#comment-132940540</a> but looking if someone have tried / achieved something similar.</p>