Jenkins email-ext plugin not sending mail

2020-05-20 08:16发布

I have Jenkins version 1.480.3 installed on my machine and Email-Extention Plugin 2.30.2.

Test mail from "Manage Jenkins" section works fine. When I add editable email notification to my jobs, I am not receiving it.

Also tried configuring "Triggers" in editable email notification advanced section. That also didn work. Console logs of build shows email has been triggered.

Can someone help me on how to debug this?

7条回答
Fickle 薄情
2楼-- · 2020-05-20 08:18

This is a long shot. But chrome was auto filling my SMTP Authentication password, so when I changed any setting and clicked save, the password would also be overwritten.

Hopefully I can save someone else a headache!

查看更多
何必那么认真
3楼-- · 2020-05-20 08:19

Wasted few days.

Also tried to Downgrade the email-ext plugin to 2.25 but this Doesn't help.

Test mail sended, In Console Log was Sending email to: mymail But stiil have no messages.

I found solution that help me....

I used gmail. So I Verifeid my gmail account via cellphone, than I fill Security Settings and gave Access to my account from unreliable sources.

Then I fill that mail into Use SMTP Authentication in Global Settings.

That worked for me :)

查看更多
成全新的幸福
4楼-- · 2020-05-20 08:26

Downgrade the email-ext plugin to 2.25

查看更多
我只想做你的唯一
5楼-- · 2020-05-20 08:31

At first you have to create a template http://url-to-jenkins/emailexttemplates/. In the field "Project Recipient List" you can add some emails (comma separated). You can also insert global variables (Manage Jenkins > Configure System > Global properties) with:

${ENV, var="PATH"}

enter image description here

The "Advanced Settings..." option provides a trigger management, just add "Recipient List" and now you should get some emails by Jenkins.

enter image description here

查看更多
不美不萌又怎样
6楼-- · 2020-05-20 08:31

Short Description of problem that I was facing:

When I was sending test mail from Manage Jenkins -> Configure System -> E-mail Notification, I was able to successfully send and receive emails but there is no such option to test email in Extended E-mail Notification tab

While running a job, when I was sending email in post-build step via E-mail plugin, I was able to successfully send and receive emails but with same settings, I was getting following error on sending mail via Extended E-mail:

MessagingException message: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8  https://support.google.com/mail/?p=BadCredentials 

I went almost crazy searching for resolution of this issue. I tried every resolution mentioned on this page but no success. I even tried downgrading the plugin to 2.25 but I was still getting error when sending email via Extended E-mail plugin. Everywhere on internet also the only solution mentioned to solve this problem was to "Allow less secure apps" and to check if credentials are valid, which in my case were valid since I was able to successfully send mail via normal email plugin.

After struggling for a few days, I finally found the silly thing that was causing this issue. I had to type-in email ids into each and every box in: Manage Jenkins -> Configure System -> Extended E-mail Notification. Copy-pasting email ids or domain names is causing this annoying and time taking issue. So, in case if you fall in such a situation, please make sure you have handwritten email ids in each column and not copy pasted.

Following configurations for "Extended E-mail Notification" worked for me:

Email Extension Plugin : 2.69
SMTP server : smtp.gmail.com
Default user E-mail suffix: <left this blank>
Enabled Use SMTP Authentication
User Name: <email id of account through which email is to be sent>
Password: <Password of account through which email is to be sent>
Advanced Email Properties : <left this blank>
Use SSL : Enabled
SMTP port: 465
Charset: UTF-8

Also, I had enabled less secure apps.

Hope this saves someone's time!!

查看更多
别忘想泡老子
7楼-- · 2020-05-20 08:35

Check if you have SSL enabled under SMTP Auth settings. For me, I was able to see a successful trigger, but email was never sent.

enter image description here

查看更多
登录 后发表回答