Cannot Send Email Due to 'javax.mail.NoSuchProviderException' SMTP Error

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

When Confluence tries to send mail, a "javax.mail.NoSuchProviderException: smtp" error is thrown.

Cause

Two different versions of Sun's Javamail libraries are in the application classpath. When Confluence tries to send an email, Java gets confused as to which version of the library it should be using.

Resolution

If (and only if) you are encountering this error, remove the javamail-x.jar and activation-1.x.jar files from the confluence/WEB-INF/lib directory of your Confluence installation, then restart Confluence.

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.