Confluence-Send test email NameNotFoundException

I am trying to send test email in confluence but I am getting the below error. How can I fix it?

Thanks for answers

An error has occurred with sending the test email:
com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name JiraGMailServer is not bound in this Context
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(
at com.atlassian.confluence.jmx.JmxSMTPMailServer.send(
at com.atlassian.confluence.admin.actions.mail.SendTestEmailAction.execute(
at com.opensymphony.xwork.DefaultActionInvocation.invoke(
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(
at com.opensymphony.xwork.DefaultActionInvocation.invoke(

4 answers

1 accepted

3 votes
Accepted answer

It cannot be done from administration panel. You should write it directly to the file as follows.

This problem has solved yet.

Here is the solution:

0 votes


Looking through your Stack Trace, this problem could be related to your resource name and JNDI name.

You must name your JNDI path according to the resource name in your server.xml. In this case:

mail/GmailSmtpServer. Therefore, my JNDI path would be java:comp/env/mail/GmailSmtpServer.


JDNI path is java:comp/env/mail/JiraGMailServer. I tried also java:comp/env/mail/GmailSmtpServer. It gives the same error.

Here is the solution:

You should change the settings from server.xml manually.

Cheers :)

I had the same problem and noticed a trailing space in the JDNI text and once I removed it, it worked. Giuliano's post helped, thanks.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

469 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you