Reset password e-mail throws error No authentication mechansims supported by both server and client

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Trying to send a password reset e-mail

The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ERROR [atlassian.event.internal.EventPublisherImpl] There was an exception thrown trying to dispatch event 'com.atlassian.crowd.event.login.RequestResetPasswordEvent@4a48ef6b' from the invoker 'com.atlassian.event.internal.SingleParameterMethodListenerInvoker@1138f5c'. java.lang.RuntimeException: Could not send email to admin@localhost.com Reason:No authentication mechansims supported by both server and client   ... Caused by: com.atlassian.crowd.manager.mail.MailSendException: Could not send email to admin@localhost.com. Reason:[EOF] at com.atlassian.crowd.manager.mail.MailManagerImpl.sendEmail(MailManagerImpl.java:90) at com.atlassian.crowd.manager.login.util.ForgottenLoginMailer.mailResetPasswordLink(ForgottenLoginMailer.java:149) at com.atlassian.crowd.event.listener.RequestResetPasswordListener.handleEvent(RequestResetPasswordListener.java:24) ... 154 more Caused by: javax.mail.MessagingException: [EOF] at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481) at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634) at com.atlassian.crowd.manager.mail.MailManagerImpl.sendEmail(MailManagerImpl.java:80)

Cause

Need additional properties in the mail resource elements.

Resolution

  1. Shut down Confluence

  2. Modify the resource in your server.xml to add the following elements:

    1 2 3 4 5 6 7 8 9 10 <Resource name="mail/ConfluenceMailServer" auth="Container" type="javax.mail.Session" mail.smtp.host="smtp.office365.com" mail.smtp.port="587" mail.smtp.auth="true" mail.smtp.user="admin@localhost.com" password="xxxxxxxx" mail.smtp.starttls.enable="true" /> 
  3. Restart Confluence

Regular Expression:Caused by: javax\.mail\.MessagingException: [EOF]

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.