How to change the security type from SSL to TLS in Jenkins

I am trying to set up the SMTP email notification. I want to configure it for my office 365.

Smtp server =


When I configured credentials, I received an error:


Jenkins on CentOS. Edit /etc/sysconfig/jenkins and add the option -Dmail.smtp.starttls.enable=true to JENKINS_JAVA_OPTIONS,

If there’s some other variable already, append -Dmail.smtp.starttls.enable=true to it, so it should be similar to the below:

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dmail.smtp.starttls.enable=true"

Restart Jenkins with service jenkins restart and you should be good to go.