victoriaharry
asked on
Must issue a STARTTLS command first when sending email from jenkins
Hi Experts,
I have jenkins installed on my windows desktop and having issues configuring it to send emails from my outlook account as it uses TLS instead of SSL. I have done some research and some forums suggested adding the JENKINS_JAVA_OPTIONS to the jenkins.xml file and doing a restart however this didn't work for me.
JENKINS_JAVA_OPTIONS -Djava.awt.headless=true -Dmail.smtp.starttls.enabl e=true
My SMTP settings are
SERVER smtp-mail.outlook.com
SMTP PORT 587
Use SSL unchecked
Username *****
Password ******
Error is below
com.sun.mail.smtp.SMTPSend FailedExce ption: 530 5.7.0 Must issue a STARTTLS command first
at com.sun.mail.smtp.SMTPTran sport.issu eSendComma nd(SMTPTra nsport.jav a:2057)
at com.sun.mail.smtp.SMTPTran sport.mail From(SMTPT ransport.j ava:1580)
at com.sun.mail.smtp.SMTPTran sport.send Message(SM TPTranspor t.java:109 7)
at javax.mail.Transport.send0 (Transport .java:195)
at javax.mail.Transport.send( Transport. java:124)
at hudson.tasks.Mailer$Descri ptorImpl.d oSendTestM ail(Mailer .java:581)
at java.lang.invoke.MethodHan dle.invoke WithArgume nts(Unknow n Source)
at org.kohsuke.stapler.Functi on$MethodF unction.in voke(Funct ion.java:3 43)
at org.kohsuke.stapler.Functi on.bindAnd Invoke(Fun ction.java :184)
I have jenkins installed on my windows desktop and having issues configuring it to send emails from my outlook account as it uses TLS instead of SSL. I have done some research and some forums suggested adding the JENKINS_JAVA_OPTIONS to the jenkins.xml file and doing a restart however this didn't work for me.
JENKINS_JAVA_OPTIONS -Djava.awt.headless=true -Dmail.smtp.starttls.enabl
My SMTP settings are
SERVER smtp-mail.outlook.com
SMTP PORT 587
Use SSL unchecked
Username *****
Password ******
Error is below
com.sun.mail.smtp.SMTPSend
at com.sun.mail.smtp.SMTPTran
at com.sun.mail.smtp.SMTPTran
at com.sun.mail.smtp.SMTPTran
at javax.mail.Transport.send0
at javax.mail.Transport.send(
at hudson.tasks.Mailer$Descri
at java.lang.invoke.MethodHan
at org.kohsuke.stapler.Functi
at org.kohsuke.stapler.Functi
Put a checkmark in the Use SSL box. SSL and TLS are essentially two terms for the same thing when you're talking about communicating with SMTP servers. TLS is a newer type of encryption and technically distinct from SSL, but email clients don't actually use SSL encryption when sending email. POP3 and IMAP can use SSL, but SMTP can't, and only uses TLS encryption via the STARTTLS verb. Because IMAP and POP3 do use it, though, a lot of mail clients got into the habit of using SSL as a generic term for encryption. This is also common when referring to Digital Certificates. Those are regularly called "SSL Certificates" even though they can be used for many different things other than SSL.
ASKER
Thanks for thefast reply. If I uncheck the SSL box I get a different error
javax.net.ssl.SSLException : Unrecognized SSL message, plaintext connection?
javax.net.ssl.SSLException
ASKER
I mean if I check it
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.