0

For my Jenkins job I would like to have Jenkins send e-mails under two conditions:

  1. The build was fine before, but now it fails.
  2. The build failed before, but now it is fine.

I do not want it to send e-mails for any additional failing builds between (1) and (2).

I would have expected that having the setting "Send e-mail for every unstable build" unchecked would prevent just that, but I receive e-mail for every single failed build.

config screen shot

How can I achieve my desired behavior? Is this a bug in Jenkins (2.121.2) or the Mailer plugin (1.21)?

rerx
  • 1,133
  • 8
  • 19

1 Answers1

1

There is a better plugin for sending emails on certain conditions on Jenkins plugin site: https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin

Try finding Editable email in post-build actions or install it via Jenkins manage plugins options.

Below is a screenshot which is part of the Editable Email notification post-build task:

enter image description here

Vighnesh Pai
  • 1,795
  • 1
  • 14
  • 38