Sending a Test Email Fails due to javax.mail.AuthenticationFailedException

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

JIRA applications fail to Send a Test Email via the SMTP server configuration located in Administration >> Global Settings >> Mail Servers. The following exception is encountered:

com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:191)

Cause

The authentication credentials supplied for the SMTP server are not correct or have expired.

Resolution

  • Correct the SMTP Mail Server username or password. Use Send a Test Email to verify that the credential's to the mail server are correct.
  • As a last resort, recreating the Mail Handler may assist here - it has been seen to fix some situations surrounding the AuthenticationFailedException when using the appropriate credentials
    • Remove the related mail handler
    • Restart JIRA
    • Create mail handler again
Last modified on Jan 15, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.