Monday, 7 March 2022

How to setup Email Notification from Jenkins using Gmail account?




To perform email notification, we need to do a pre - setup gmail account and Jenkins.

Let's go through the pre-setup:

==> Pre Setup on Gmail

1. Turning on 'less secure apps' settings as mailbox user

  1. Go to your (Google Account).
  2. On the left navigation panel, click Security.
  3. On the bottom of the page, in the Less secure app access panel, click Turn on access.
    If you don't see this setting, your administrator might have turned off less secure app account access (check the instruction above).
  4. Click the Save button.

2. Turn Off two step verification 

How to schedule Job in Jenkins using CRON?

==> Pre-Setup on Jenkins


  • Now go to Manage Jenkins-> Configure System
  • Scroll down to the email notification section. If you are using Gmail, then type smtp.gmail.com for the SMTP server. 
  • Click on Advanced and select Use SMTP authentication. 
  • Enter your Gmail username and password. 
  • Select the Use SSL option and enter the port number as 465
  • Click on Apply and then Save.

After the pre-setup we need to go to the Jenkins job so that we can integrate the email notification:

Go to Job(Jenkins automation execution Job)

==> Configure

==> Post Build Actions 

==> Select “Editable Email Notification” from the dropdown 

==> Advanced Settings

==> Triggers

==> Add Trigger Always

==> Select “Recipient” for “Send To” option

==> Click on Advance 

==> Enter the recipient email id and change the subject as per your automation suite.


How to send Email Notification from Jenkins using Groovy Script?



Suggested Post:

ALL ABOUT AUTOMATION FRAMEWORK DESIGN

Java Interview question Set-1:

SET-01 1-10

Java Interview question Set-2:

SET-02 10-20

Java Interview question Set-3:

SET-03 21-30

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...