Sending email via pipe is failed in bitbucket pipeline

Sankar Palanisamy
Contributor
April 28, 2021

Hi All,

I am trying to send the build status via email using email-notify pipe but its failed with sending failed.

 

- pipe: atlassian/email-notify:0.4.3

variables:

USERNAME: 'yyy@xxxx.com'

PASSWORD: $PASSWORD2

FROM: 'yyy@xxxx.com'

TO: 'abcde@xxxx.com'

HOST: 'corporate.mail.protection.outlook.com'

SUBJECT: '${ALERT_TYPE}:Bitbucket Pipe Notification for ${BITBUCKET_BRANCH}'

DEBUG: 'true' 

Host is corporate office 365 domain

Error message

image.png

Outlook office 365 settings in my account

image.png

 

2 answers

0 votes
Maria Bobrova
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 6, 2022

Hi! Have same issue on my Pipelines in BitBucket. 

Here is my ymlFile. Sending from gmail account to gmail account. When try to add Port - it fails telling that there is no way to send an email

ymlFile.jpg

And this is what I receive in the end

sendingEmail.jpg

If anyone can help me with that I would be very appreciated! Happy holidays!

0 votes
Andy Osborn
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!
April 29, 2021

Looks like the port is blocked because that SMTP host only supports port 25.

Ideally you should use smtp.office365.com as the host if you want the port to be 587 (the default, which you don't indicate so it must be). This is the recommended way since SPF will be valid.

That doesn't support MFA though, so if you need that you need to change the port to 25 and use the host you have above. That doesn't support external emailing, which normally is fine. SPF will also fail, so it may be blocked unless you make some rules. You might be able to figure out the SPF setting from Atlassian's TXT record and add it to yours.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events