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

Facing error in sending email using bitbucket email pipe.

Abinaya Abi
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!
March 14, 2024

I am trying to send mail with cucumber report zip file attached with it. 

My configuration settings:

image: cypress/base:20.9.0
pipelines:
  default:
    - step:
        name: Cypress Tests
        caches:
          - node
        script:
          # install dependencies
          - npm ci || true
          # run Cypress tests in electron
          - npx cypress run --spec cypress/e2e/**.feature && node ./cypress/cucumberReport.js
        after-script:
          - apt-get update && apt-get install -y zip
          - zip -r cucumber-report.zip cypress/cucumber-report/
          - STATUS="success"
          - if [[ $BITBUCKET_EXIT_CODE -ne 0 ]]; then STATUS="FAILED" ; fi
          - pipe: atlassian/email-notify:0.13.1
            variables:
              USERNAME: 'XXXXXXXXX@gmail.com'
              PASSWORD: 'YYYYYYY'
              FROM: 'XXXXXXXXX@gmail.com'
              TO: 'YYYYYYYYYYY@gmail.com'
              HOST: 'smtp.gmail.com'
              SUBJECT: 'BUILD# ${BITBUCKET_BUILD_NUMBER} ${STATUS}:Bitbucket Pipe Notification for ${BITBUCKET_BRANCH}.'
              ATTACHMENTS: 'cucumber-report.zip'
cucumber-report folder consist of 3 folders. Assets folder, features folder and index.html. I can able to zip the folder. But I can't able to send the mail. it was throwing an error mentioning "Check your configuration settings."

1 answer

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

Hi @Abinaya Abi

Thanks for your question!

Try to add DEBUG variable to email-notify pipe to see more details about your error:

script:
  - pipe: atlassian/email-notify:0.13.1
    variables:
      ...
      DEBUG: "true"

 

Best regards,
Oleksandr Kyrdan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events