Praveen
Praveen

Reputation: 657

Jenkins email-ext plugin not sending mail

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?

Upvotes: 24

Views: 70249

Answers (11)

michal-michalak
michal-michalak

Reputation: 1165

Try to use Extended E-mail Notification > Enable Debug Mode (selected). It will show you more logs in the Job Run Console section.

In my case, it showed me in the logs that credentials copied from regular email-ext (AK_AWS_SES_CREDENTIALS/****** (Migrated from email-ext username/password)) were not able to connect to AWS SES SMTP service.

Upvotes: 0

Alex
Alex

Reputation: 239

i performed the following action (after hours and hours of investigation) and at the end it worked for me.

  1. Unistalled the Extended mail plug in.

  2. Deleted from .jenksins the plugIn (it remains also after Unistall).

  3. Reinstalled the Extended mail plug In and enabled it.

  4. Restart Jenkins.

  5. In the Jenkins Configure System, in the Extended E-mail Notification section, I set a new credential access to my gmail account (also the previous credential stored were correct but i preferred to generate a new one with a different description).

  6. And then... Finally afteer several time on this matter it works for me!.

Upvotes: 0

Engr.MTH
Engr.MTH

Reputation: 1044

I spent hours trying to resolve this issue, I've implemented everything mentioned here, and didn't work for me, the solution that worked for me was to uninstall the plugin and install it again!

Upvotes: 1

Michael
Michael

Reputation: 2955

Sometime after 2.66, if the From field is not set in the project, it doesn't seem to be falling back to the system email address. I believe this ticket is tracking the issue. https://issues.jenkins-ci.org/browse/JENKINS-63522

Upvotes: 0

Sugandha Jain
Sugandha Jain

Reputation: 353

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!!

Upvotes: 0

Eric Nelson
Eric Nelson

Reputation: 346

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!

Upvotes: 0

Ashutosh Srivastav
Ashutosh Srivastav

Reputation: 669

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

Upvotes: 1

TouDick
TouDick

Reputation: 1322

It appears that, in some version Extended E-mail Notification become own SMTP Server configuration. So check your configuration under "Manage Jenkins" -> "Configure System" -> "Extended E-mail Notification" and make sure that fields "SMTP Server" and " Default user E-mail suffix" are filled properly.

Make sure also that the configuration is consistent with "Manage Jenkins" -> "Configure System" -> E-mail Notification.

TL;DR

Fill out fields "SMTP Server" and " Default user E-mail suffix" under "Manage Jenkins" -> "Configure System" -> "Extended E-mail Notification"

Upvotes: 7

Max Alinda
Max Alinda

Reputation: 11

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 :)

Upvotes: 1

SlashGordon
SlashGordon

Reputation: 880

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

Upvotes: 25

Praveen
Praveen

Reputation: 657

Downgrade the email-ext plugin to 2.25

Upvotes: 0

Related Questions