3

I am currently trying to set up our Jenkins to send emails when the build succeeded or failed. I want to use email-ext for this job. I want to send emails to the git committers only because I don't want to spam any other recipients. This is why I left the global recipient list empty.

However, when I configure a trigger to send an email to the developers ("send to recipient list" and "send to requestor" are unchecked) it fails with the following error:

Email was triggered for: Failure
Sending email for trigger: Failure
An attempt to send an e-mail to empty list of recipients, ignored.

I don't want to send to a list of recipients. The only one, who should receive an email, should be the git committer of the last commit. How do I do that?

Denis Loh
  • 2,194
  • 2
  • 24
  • 38
  • I'm not using any plugins for this, it just works fine for me when I add a normal Email Notification as Post-build action to the project. Don't need to specify any recipients, but need to tick the option for "Send separate e-mails to individuals who broke the build". Then again, it's been a while since I upgraded Jenkins, so this might have changed for all I know. – Steinar Sep 10 '13 at 10:16
  • I also tried that, but I still get the following message: "An attempt to send an e-mail to empty list of recipients, ignored." I don't know if the git plugin is capable of providing the committers email addresses. I am using version 1.4 of the git plugin and 1.0.7 of the git client plugin. – Denis Loh Sep 10 '13 at 10:48
  • I'm using version 1.1.26 of the git plugin (and not the git client plugin). It looks like the plugin is unable to retrieve the email address(es) from the git repo. Are the email addresses set correctly with git for each user? I.e. something like: `git config --global user.email "my@email.com"` – Steinar Sep 10 '13 at 13:49
  • 1
    There should be a checkbox "send to committers" (see https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin) – imagineerThat Nov 25 '13 at 22:55
  • I just obtained the plugin myself and see no "send to committers". Perhaps they removed it and replaced it only with "send to culprits" – imagineerThat Nov 25 '13 at 22:57

1 Answers1

0

Email-ext does'nt have an option to send mails only to committers.Infact you can use triggers for both Failure and success and trigger mails either to culprits or recipent list.

you have this error:An attempt to send an e-mail to empty list of recipients

because you have used trigger option with no emails-ids any where in the recipents list or predefined some where. best way is to use Recipents list

prudviraj
  • 3,634
  • 2
  • 16
  • 22