(Apologies if provided information is not sufficient enough. This is my first time setting-up / using jenkins)
- Have configured mailer, email, and email extension plugins to use my gmail smtp
- Jenkins Pipeline built to send email notification as a post- step
- Test smtp email from jenkins successful { smtp.google.com, my username, my 2fa app pwd, SSL, port:587 }
- Emailext plug-in's SMTP settings match ones created in step 3
- Post- build email fails w/ following:
Adding recipients from trigger recipient list
Successfully created MimeMessage
Sending email to: << redacted >>
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: need username and password for authentication
DEBUG SMTP: protocolConnect returning false, host=smtp.google.com, user=jenkins_adm, password=<null>
DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.google.com", port 587, isSSL false
Few other things I've tried:
a. when emailext plugin SMTP settings are set to some invalid values e.g. smtp server = lalaland, port = 25, user = dumbo, password = dumbo; pipeline build shows same error as above, in the console log
b. when email plugin SMTP settings are erased, logs indicate below mentioned, and it assumes user=jenkins_adm (my jenkins admin acct). Log shows same issue as above:
DEBUG SMTP: need username and password for authentication
DEBUG SMTP: protocolConnect returning false, host=smtp.google.com, user=jenkins_adm, password=<null>
DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.google.com", port 587, isSSL false
c. tried turning SSL on, TLS off; same result. it doesn't take the username/pwd from emailext or mailer plugin's .xml file
Happy to provide further logs / information.