Issue
-
I have configured Microsoft Exchange as SMTP Server for Jenkins and a similar stacktrace on my job console output is being shown
javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at javax.mail.Transport.send0(Transport.java:194) at javax.mail.Transport.send(Transport.java:124) at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:566) ...
Environment
-
CloudBees Jenkins Enterprise - Managed controller (CJE-MM)
-
CloudBees Jenkins Enterprise - Operations center (CJE-OC)
-
Microsoft Exchange - configured as NTLM authentication.
Resolution
On Jenkins side
-
Add the Java Property
-Dmail.smtp.auth.ntlm.domain=<Domain_name>
and restart Jenkins -
Configure SMTP Server under Manage Jenkins > Configure System as follows:
2.1. Use one of the following syntaxes for your user:
Domain_name\username
,username@Domain_name.com
2.2. Enable SSL
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.