Mail server at location is not of required type javax.mail.Session
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
The following error is displayed when adding a JNDI setting to an email server (especially if you are connecting your instance to Gmail). This is also commonly seen after an upgrade if you had JNDI configured for your email server.
The following appears in the atlassian-confluence.log:
An error has occurred with sending the test email: java.lang.IllegalArgumentException: Mail server at location [java:comp/env/mail/GmailSMTPServer] is not of required type javax.mail.Session.
As explained on Setting Up a Mail Session for the Confluence Distribution, you need to ensure that you move (don't copy)
<confluence-install>\lib (x.x.x. represents the version numbers on the jar files in your installation).
Don't leave a renamed backup of the jar files in
\confluence\WEB-INF\lib. Even with a different file name, the files will still be loaded as long as it remains in the directory.
Removing the duplicate file should solve the problem.
- Shutdown Confluence
- Delete the
- Restart Confluence and attempt to reconfigure your mail server again.
This is being tracked at in the following for a permanent resolution: - CONF-43358Getting issue details... STATUS
Was this helpful?Yes Provide feedback about this article