How to send Email at every build with Jenkins

Install Email-ext plugin

  • Install Email-ext plugin at plug-in install page of Jenkins

Configure System

“Jenkins Location” section

  1. Enter valid email address to “System Admin e-mail address”

“Extended E-mail Notification” section

  1. Enter your email address to “Default Recipients”

“E-mail Notification” section

  1. Enter your SMTP server name to “SMTP server”
  2. Click “Advanced”
  3. Click “Use SMTP Authentication”
  4. Enter required informations
  5. Check “Test configuration by sending test e-mail”
  6. Click “Test configuration” to send test email
  7. Click “Save” in the bottom of the page

Configure a project to send email at every build

  1. Click “Add post-build action”
  2. Click “Editable Email Notification”
  3. Click “Advanced Settings…”
  4. Click “Add Trigger”
  5. Click “Always”
  6. Save

Test-run

  1. Click “Build Now”
  2. Check Console output and received email
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.497s
[INFO] Finished at: Sat Feb 22 22:27:21 JST 2014
[INFO] Final Memory: 18M/245M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /Users/Shared/Jenkins/Home/jobs/BuildAndTestHead/workspace/hellojenkins/pom.xml to org.nailedtothex/hellojenkins/0.0.1-SNAPSHOT/hellojenkins-0.0.1-SNAPSHOT.pom
channel stopped
Archiving artifacts
Email was triggered for: Always
Sending email for trigger: Always
Sending email to: kyle@example.com
Finished: SUCCESS

Yosef Sukianto has written 36 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>