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

Bamboo - Send email notifications to list generated by job

Aske Jenstrup Olsson March 14, 2019


I'm running a plan where there are tests in different areas. After the testing is done I can analyze the failing tests and determine which area they belong to.

Based on this I want to send a notification to the person responsible in each area.

My plan was to generate a recipients file in the job containing the recipients emails and use this for notification recipients, but this seems not to be possible.

Is there a way to generate notification recipients based on build/job output?


1 answer

1 accepted

1 vote
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 15, 2019

Hello Aske,

I see you are new here, please be welcome!

From Bamboo default notifications you are able to notify:

  • Users
  • Group of users (Bamboo groups)
  • Custom mail (that could be a list, or add multiple entries)
  • Responsible users
  • Committers
  • Watchers

If none of the options above works for you, then the option I see is using the terminal command (basically Unix approach) to send the email you need. 

To follow this approach you will need to solve three issues:

  1. Build a list of emails.
    Bamboo won't help you on this one. The best option here is to use an external list or try to grab the mails from the Bamboo DB manually.
  2. Decide in which condition you will send the notification.
    If you need to run only when something breaks then you will need a plugin to run a post-build command: Pre-Post Build Command Runner | Atlassian Marketplace
  3. Send the notification through terminal.
    You will probably find multiple solutions for this one. One of them is using Mutt. This is an example of this command on bash:
    mail_list="first@mail.address second@mail.address"
    mutt -e 'set content_type="text/html"' -s "subject" < mail_file.html $mail_list

I shared the option above, but I do see that it has multiple drawbacks to be actually used:

  • Generating the dynamic mail list can be challenging.
  • Running the mails command will require that your agent or Bamboo server has its mail server properly configured (not Bamboo, but the OS).

There is also an improvement request that may interest you: [BAM-17085] Send customized email via Bamboo Task.

This is more like an informative answer. I wish I could shed some light on your question.

Maybe using a Bamboo group could be simpler, with the drawback of sending emails to people that don't really need to receive them.

Aske Jenstrup Olsson March 18, 2019

Thanks for the reply.

I'll go with the unix approach of sendings mails through the terminal.

Building the dynamic list isn't a problem for me, I'll probably just put some '.owners' files containing emails in the folder structure of our source, then read these if something fails.

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2019

You are welcome!
I'm glad there was a workaround that serves to your purpose.

See you in the next thread!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events