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

Getting '✖ Failed to send email to 123@gmail.com.' for build failure using email notify pipe 0.8.0

Depstan Thankachan Xavier March 30, 2023

We are getting the following message "

✖ Failed to send email to 123@gmail.com. Check your configuration settings." when our build is failed. 
Where as we are getting the emails and requested details when the build is success. In both the scenarios the after script and email notify pipe were same. 
Sample script used in our project.

after-script:
- HTML_FILE=$(find . -iname testResult*.html)
- if [[ BITBUCKET_EXIT_CODE -eq 0 ]]; then ALERT_TYPE="SUCCESS" ; else ALERT_TYPE="FAILED" ; fi
- pipe: atlassian/email-notify:0.8.0
variables:
USERNAME: $USERNAME
PASSWORD: $PASSWORD
FROM: 'abc@gmail.com'
TO: '123@gmail.com'
HOST: 'smtp.office365.com'
PORT: '###'
SUBJECT: '[Test Run] - ${ALERT_TYPE} - ${BITBUCKET_BRANCH} : Build #${BITBUCKET_BUILD_NUMBER}'
BODY_PLAIN: '[Test Automation Run Results] - ${BITBUCKET_BRANCH} - Build No:- ${BITBUCKET_BUILD_NUMBER}'
ATTACHMENTS: ${HTML_FILE}

 Could you please help me what is the problem here ? 

@Oleksandr Kyrdan - could you please share some insights on this? Please feel free to let me know if you need more details regarding the issue?

Thanks

Depstan T 

1 answer

0 votes
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 31, 2023

Hi @Depstan Thankachan Xavier 

Thank you for your question!

Looks like your ATTACHMENTS file are not correct/or not exist when your build failed.

Could you validate and check the testResult with `ls` or `cat` command.

 

Best regards,
Oleksandr Kyrdan

Suggest an answer

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

Atlassian Community Events