Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61379

presend scripts not run when recipient list is empty

    • 2.71

      When sending emails using the email-ext plugin, I'm manually populating the recipient list using the pre-send script feature. This means that the recipient list is empty at first and gets populated during the pre-send step.

      Unfortunately an empty recipient list stops the entire process before the pre-send step is even run, with the message: "An attempt to send an e-mail to empty list of recipients, ignored".

      It would make sense to let the pre-send script run before checking if the recipient list is empty.

          [JENKINS-61379] presend scripts not run when recipient list is empty

          Alex Earl added a comment -

          There are specific reasons that this is the ordering. You can have a dummy email address and then remove it during the pre-send script.

          Alex Earl added a comment - There are specific reasons that this is the ordering. You can have a dummy email address and then remove it during the pre-send script.

          Hmm, not a fan of the dummy email but it will definitely work for my use case.
          I didn't find any issues when testing the new order, but I trust that with a bit more time I would have eventually found it.

          I'll close the issue as well as the PR on github.
          Thanks for the quick response.

          Stefan Rasmussen added a comment - Hmm, not a fan of the dummy email but it will definitely work for my use case. I didn't find any issues when testing the new order, but I trust that with a bit more time I would have eventually found it. I'll close the issue as well as the PR on github. Thanks for the quick response.

            slide_o_mix Alex Earl
            stefankroell Stefan Rasmussen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: