[Bamboo Knowledge Base]
Bamboo can send email notifications about its build results. There are two steps to setting this up:
To configure Bamboo to send SMTP email:
Edit the mail server settings as necessary:
Setting | Description |
---|---|
Name | A display-name for the email address e.g. 'SMTP Server' |
From Address | The email address from which Bamboo notifications will be sent. |
Subject Prefix | The text (if any) which will be added to the start of the email subject line. For example '[Bamboo]' will result in emails with subjects like:
|
Email Settings | Choose either SMTP or JNDI. See the Notes about JNDI below. |
SMTP Server | The address of the email server that Bamboo will use to send notifications e.g. 'mail.myserver.com'. |
Username | The login name of the account that Bamboo will use to login to the SMTP server. |
Password | The password of the account that Bamboo will use to login to the SMTP server. |
JNDI Location | Depends on your application server, and on the location of the 'mail' resource within the JNDI tree you specify. E.g. 'java:comp/env/mail/BambooMailServer'. |
Screenshot: Email Server Details
Gmail.com uses TLS (SSL). A JNDI connector needs to be configured. Unfortunately Bamboo does not yet support JNDI with TLS.
To enable Gmail as your mail server:
Add the following configuration to your BambooInstall/conf/server.xml file:
<Context path="/bamboo" docBase="${catalina.base}/bamboo.war" 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>
Ensure that the files mail-X.X.jar
and activation-X.X.jar
exist only in the BambooInstall/lib folder. You can move those installed at <Bamboo-Install>/atlassian-bamboo/WEB-INF/lib to apache-tomcat-xxx/lib
if they don't exist there yet. If they are already there, you can delete those shipped with Bamboo.
java:comp/env/mail/GmailSmtpServer
. Note that the JNDI Location is case sensitive and must match the resource name specified in server.xml
.You can use a mail session as an alternative to specifying mail details directly in Bamboo. You configure the mail session in your application server (e.g. in the server.xml file — see Locating important directories and files), and then use JNDI to look up the preconfigured mail session. JNDI has the following advantages: