Configure Jenkins Email Notification AND Solved Not Working

Configure Jenkins Email Notification AND Solved Not Working

in this blog post i will show you how to configure jenkins email notification clearly.

Go to manage jenkins

jenkins email notification

Go to configure system

 

jenkins email not working

You can see at the end E-mail Notification or extended Email Notification

Configure Jenkins Email Notification-Jenkins Email Notification

configure jenkins email notification

 

There you can see SMTP server

If your mailid is gmail you have to mention smtp.gmail.com at smtp server

For gmail smtp server is smtp.gmail.com

Click on advanced you can see like this

configure jenkins email notification not working

Check the Use SMTP Authentication it will show you username and pasword

If you not check it will not show username and password so you can not send emails so check it

And Enter  your  gmail username password

whatever mail id and password you mentioning here from this mail only all mails will generated and  will be sent to others(recipients in post build actions).

Check the use ssl.

you have to enter smtp port, for gmail it is 465.

At reply address you can mention noreply@gmail.com

Charset bydefault you will get UTF-8 so keep like that only.

In case if you are using other emails or your organisation emails, then ask your IT team they will provide you smtp sever details and port numbers and enter here.

After entering details you can check this functionality is working or not by using test configuration by sending test e-mail.

Check the test configuration by sending test e-mail. You will get Test e-mail recipient

Enter any mail id here iam entering one of my mail id SKXXXXX@gmail.com

And click on test configuaration . you will get like email was successfully sent.

Jenkins Email Notification Not Working-Solved-Jenkins Email Notification

If you get an error you have to change some permissions on your google gmail id account.

Above You provided your gmail id and password. jenkins works like a app.

Jenkins will automatically login to your mail id and it will sent test mail(mails) to your test mail id(recipients in post build actions).

But  your google gmail account will not give access to login from other apps.

So you have to change the permissions of your google gmail account.

So login to your google account you can see like this.

jenkins email notification not working

click on Apps with account access. at the end of the page  You can see Allow less secure apps: OFF.

jenkins gmail notification

 

Click on it and Make it on. so now jenkins can login to your email.

now go to jenkins and click in test configuration then testmail will be sent you can see like Email was successfully sent in jenkins.

Adding E-mail Recipients-Jenkins Email Notification

when ever build fails this recipients will get notified

to add emails go to your job configuration and go to post build actions and add post build action and click on E-mail notification

you can see like this in image

jenkins post build action

in recipients section add your mail ids, so when ever build fails these recipients will get mails and notified.

and save the job.

 

 

Leave a Reply

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