Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Enable Email Notifications in Bitbucket

Jash
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2025

Is there any Email notification services there to send mails while running pipeline its successful or failed.

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 6, 2025

Hi @Jash and welcome to the community!

Bitbucket offers the option to subscribe to email notifications about Pipelines, however these notifications are sent only on failed builds and not on successful ones (we have a feature request to send on successful ones as well: https://jira.atlassian.com/browse/BCLOUD-20358).

You can configure this the following way:

  1. Open the repository on Bitbucket's website and select Source from the left sidebar

  2. Select the three dots option, next to the Clone option, near the top right corner:

    Screenshot 2025-01-06 at 13.09.25.png

  3. Then, select Manage notifications
  4. If you see a message saying You are not watching this repository, like below:

    Screenshot 2025-01-06 at 13.10.05.png

    select Watch this repository, then select the option Pipelines and Close


If you'd like to get notifications both on successful and failed builds, you can check the knowledge base article that Trudy provided. The solution in this article uses the pipe atlassian/email-notify to send email notifications after a certain step is finished. If your build has multiple steps, you can configure steps other than the last one to only send a notification when there is a failure.

Please note that the pipe can be used only with Pipelines steps running on Atlassian's infrastructure or with a self-hosted Linux Docker runner and it is recommended to use it either with your own email server or third-party providers that support massive email notifications.

Please feel free to reach out if you have any questions!

Kind regards,
Theodora

0 votes
Trudy Claspill
Community Champion
January 5, 2025

Hello @Jash 

Welcome to the Atlassian community.

Take a look at this article to see if it helps you.

https://confluence.atlassian.com/bbkb/how-to-send-a-pipeline-build-status-email-from-bitbucket-cloud-pipelines-1251412104.html

Boris Alyurov February 12, 2025

What is the solution for the self-hosted local runners?

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2025

Hi Boris,

If you are using Linux Shell, MacOS or Windows runners where pipes are not supported, you could look into the following options:

  • A command line email client compatible with the OS of the machine where the runner is running. If you install such a client on the machine, you should be able to use it in the after-script of a step in order to send an email notification depending on the step's exit code.
  • An email API from your mail provider. If your email provider has an API endpoint that you can use to send emails, you could use that e.g. with curl in the after-script of your step, in order to send an email notification.

Kind regards,
Theodora

Boris Alyurov February 18, 2025

Thank you

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events