Bamboo can send email notifications about build results. There are two steps to setting this up:
- Configure Bamboo to send SMTP email (see below).
- Configure a plan to send SMTP email notifications about build results (see Enabling or disabling Notifications for a Plan).
To configure Bamboo to send SMTP email,
- Click the 'Administration' link in the top navigation bar.
- Click the 'Mail Server' link in the left navigation column (under 'Communication').
- This will display the 'Mail Server Details' page (see screenshot below). Click the 'Edit' button.
- In the 'Name' field, type a display-name for the email address in step 5 (below).
- In the 'From Address' field, type the email address from which Bamboo notifications will be sent.
- In the 'Subject Prefix' field, type the text (if any) with which you would like the email Subject line to begin. E.g. if you type '[Bamboo]', then people will receive emails with Subjects like this:
- '[Bamboo] TEST build 1,001 has FAILED (77 tests failed, no failures were new) : Change made by jsmith'
- '[Bamboo] TEST build 1,002 was SUCCESSFUL (with 77 tests) : Change made by jsmith'
- If you are not using JNDI¹,
- In the 'SMTP Server' field, type the name of the email server via which Bamboo notifications will be sent. E.g. 'mail.myserver.com'.
- In the 'Username' field, type the login name of the account which Bamboo will use to login to the SMTP server.
- In the 'Password' field, type the password for the account specified in step 7 (if any).
- Go to step 8.
- If you are using JNDI¹, type the JNDI name in the 'JNDI Location' field. The JNDI Location will depend 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'.
- Type a test email address in the 'Test Recipient Address' box.
- Click the 'Test' button, and verify that a test email is received.
- Click the 'Save' button.
¹ Note re JNDI: As an alternative to specifying mail details directly in Bamboo, you can configure them in your application server (e.g. in the server.xml file — see Locating Important Directories and Files), and then use JNDI to look up a preconfigured mail session. JNDI has the following advantages:
- Centralised management - mail details are configured in the same place as database details, and may be configured through your application server administration tools.
- Better security - mail details are not available to Bamboo administrators through the Bamboo interface, and aren't stored in Bamboo backup files.
- More SMTP options - e.g. SSL. If you want to use SMTP over SSL you will need to use JNDI.
Screenshot: 'Email Server Details'
