Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JNDI email configuration NameNotFoundException

zej December 16, 2017

I am trying to setup email configuration for Bamboo, same operation worked for confluence. But it always pop out same error. 

 

Server.xml was modified ,and two email.jar was moved to required directory.

 

Official Guide

The mail settings you entered were not valid. Error thrown was: javax.naming.NameNotFoundException: Name [mail/SmtpServer] is not bound in this Context. Unable to find [mail].

1 answer

1 vote
zej December 16, 2017

I solved it ~ hah~

 

it turns out i don't need to add whole piece into server.xml, only the content in Resource tag is enough.

 

<Context path="/bamboo" docBase="${catalina.base}/atlassian-bamboo" reloadable="true">
          <Resource name="mail/GmailSmtpServer"
            auth="Container"
            type="javax.mail.Session"
            mail.smtp.host="smtp.gmail.com"
            mail.smtp.port="465"
            mail.smtp.auth="true"
            mail.smtp.user="<your-name>@gmail.com"
            password="<your-pw>"
            mail.smtp.starttls.enable="true"
            mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
          />
</Context>
Paul Roesler January 22, 2020

After putting the Resource stanza inside the existing Context tags, I also had to enable less secure app in gmail.

You can find out more here:  https://support.google.com/accounts/answer/6010255?hl=en

 

Hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events