Jenkins email-ext plugin not sending mail

后端 未结 8 2480
离开以前
离开以前 2021-02-01 20:21

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

8条回答
  •  不思量自难忘°
    2021-02-01 20:59

    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: 
    Enabled Use SMTP Authentication
    User Name: 
    Password: 
    Advanced Email Properties : 
    Use SSL : Enabled
    SMTP port: 465
    Charset: UTF-8
    

    Also, I had enabled less secure apps.

    Hope this saves someone's time!!

提交回复
热议问题