Sending Mail using Jenkins Plugin (Linux based)

Ashish Kumar
May 15, 2020 · 3 min read

This article will guide you on how to send email using the plugins available in Jenkins. I will be using Gmail as the mail server here.

Settings to be done Google Account settings

Also, make sure, 2 Step Verification is switched off.

Now, moving on to Jenkins and configuring it.

  1. Installing the required plugins.

** Every plugin installed has its own use cases. The main plugin is marked in red.

2. Changes in the Jenkins configuration file

Open /etc/sysconfig/jenkins and edit JENKINS_JAVA_OPTIONS as follows ::

and restart Jenkins service

3. Configuring the plugin

** TLS is the successor of SSL so we will be using it here.

** All the plugins need to be configured separately. I will be showing you a basic setup of one of the plugins and the same can be followed for all.

If using SSL instead of TLS, then use port 465.

Please make sure either your firewall is off or the ports are allowed through firewalld.

SMTP Server: Server to be used for mailing service. I have used the Gmail server. You can set your accordingly.

Reply-to-address: If you don’t want any queries on the server mail, then provide this so any reply to this mail will go to that email id.

Verifying the configuration

Tested and running successfully.

4. Using the plugins

These plugins can be found in post-build actions and can be used as per the requirement. For example, E-mail notification gives you just two options i.e. sending mail for unstable builds and emails to the devs who broke the build. Recipients can be set accordingly.

The other two notification plugins provide more elaborate features.

I hope this helped. You can appreciate by giving us an applaud.

Worked in collaboration with Daksh Jain.

Connect me on my LinkedIn as well.

LinuxWorld Informatics Pvt. Ltd.

Making India, Future Ready!

LinuxWorld Informatics Pvt. Ltd.

LinuxWorld Informatics Pvt. Ltd.(‘LW’) is a fast-growing ISO 9001:2008 Certified Organisation, Fully governed by young & energetic technocrats, dedicated to Linux, Security & Open Source Technology…

Ashish Kumar

Written by

Just a tech enthusiast… Research, implement and share is what I like to do

LinuxWorld Informatics Pvt. Ltd.

LinuxWorld Informatics Pvt. Ltd.(‘LW’) is a fast-growing ISO 9001:2008 Certified Organisation, Fully governed by young & energetic technocrats, dedicated to Linux, Security & Open Source Technology…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store