Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send email notification from Jenkins

Tags:

I want to send email notification when any job gets done. Please let me know how can we propagate.

like image 961
user1587599 Avatar asked Aug 09 '12 13:08

user1587599


People also ask

How do I send an email notification from Jenkins pipeline?

Configuring Email Extended To send email, the plugin needs the smtp configured. Go to Manage Jenkins > Configure System > search for “Extended E-mail Notification”. Configure the smtp. Example: My configuration with gmail smtp.

How do I use editable email notifications in Jenkins?

Click the 'Advance Settings…' button in the 'Editable Email Notification' box. Click the 'Add Trigger' drop-down and select the 'Always' option and Click the 'Save' button. Go to Email-Notification Jenkins job and click on Build now. Check the Recipient's mail box.

Does Jenkins have notification mechanism?

Jenkins comes with an out of box facility to add an email notification for a build project. Step 1 − Configuring an SMTP server. Goto Manage Jenkins → Configure System. Go to the E-mail notification section and enter the required SMTP server and user email-suffix details.


2 Answers

You can configure Jenkins to send email when a job finishes either by using a plugin or not.

Built-in

First you have to configure your mail server settings by clicking on Manage Jenkins > Configure System and find the E-mail Notification section near the bottom of the page. Optionally also configure System Admin e-mail address in the Jenkins Location section.

Then for each job got to its configuration and Add post-build action, select E-mail Notification and configure as needed.

Plugin

The issue with default jenkins email mechanism is that it has very limited customization.

The alternate approach is to use the Email-Ext plugin, a powerful email notification mechanism. You can define some global triggers but you can also customize the settings for each job. Sending emails for success, failure or any other build status is supported.

like image 196
ppapapetrou Avatar answered Oct 22 '22 16:10

ppapapetrou


  1. Go to : manage jenkins --> manage plugins --> 'available' tab --> select 'email extension plugin' --> click on button 'install without restart'

  2. manage jenkins --> configure system --> enter details in 'email notification'

Fill up the details as given below and save it:

enter image description here

  1. In the configuration of project/job , tick on the 'email notification' ---> enter the details ---> save it ---> build the job/project
like image 28
kalyani chaudhari Avatar answered Oct 22 '22 16:10

kalyani chaudhari