Emails sent using bitbucket-pipeline(email-notify) pipe are not received

Ganesh Santosh Naik January 1, 2023

Hi Team,

We have a requirement to send email notifications through bitbucket pipeline. I have set up email-notify pipe in after script as below using amazon ses.

after-script:
- ALERT_TYPE="success"
- if [[ $BITBUCKET_EXIT_CODE -ne 0 ]]; then ALERT_TYPE="error" ; fi
- pipe: atlassian/email-notify:0.8.0
variables:
USERNAME: $SMTP_USERNAME
PASSWORD: $SMTP_PASSWORD
FROM: 'abcdef@example.com'
TO: 'abc@example.com, xyz@example.com'
HOST: 'email-smtp.ap-south-1.amazonaws.com'
PORT: '25'
SUBJECT: '${ALERT_TYPE}:Bitbucket Pipe Notification for ${BITBUCKET_BRANCH}'
ATTACHMENTS: 'reports.zip'
DEBUG: 'true'

The pipeline log shows email sent is successful but we have not received the email from bitbucket. 

Any known reason why this occurs and any solution recommended by the team would be helpful

Thanks

1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 2, 2023

Check your amazon SES logs, it could be anywhere between something simple like a verification email for the sending address, and a complex protocol issue.  

Ganesh Santosh Naik January 3, 2023

Hi Erez, 

Thanks for your response. I can see that both ses domain and email id is verified in our account. The same smtp credentials are working in other jenkins pipeline and we are receiving emails too. 

Ganesh Santosh Naik January 3, 2023

PFA  screenshot for referenceses-bitbucket.png

Suggest an answer

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

Atlassian Community Events