Hi,
When I try to send an HTML file as an attachment then I am able to receive an email from the bitbucket pipeline but when I am trying to send a Zip file then I am seeing a error "Failed to send email to email@email.com. Check your configuration settings."
Note: I am not the admin of this repository, Do I need to ask an admin to make some changes?
Yml file , Attachment is an HTML file
custom: # Pipelines that can only be triggered manually
QA2: # The name that is displayed in the list in the Bitbucket Cloud GUI
- step:
image: openjdk:8
caches:
- gradle
size: 2x # double resources available for this step to 8G
script:
- apt-get update
- apt-get install zip
- cd config/geb
- ./gradlew -DBASE_URL=qa2 clean BSchrome_win
- cd build/reports
- zip -r testresult.zip BSchrome_winTest
after-script: # On test execution completion or build failure, send test report to e-mail lists
- pipe: atlassian/email-notify:0.3.11
variables:
<<: *email-notify-config
TO: 'email@email.com'
SUBJECT: "Test result for QA2 environment"
BODY_PLAIN: |
Please find the attached test result report to the email.
ATTACHMENTS: config/geb/build/reports/BSchrome_winTest/tests/index.html
Yml file, attachment is a zip file
custom: # Pipelines that can only be triggered manually
QA2: # The name that is displayed in the list in the Bitbucket Cloud GUI
- step:
image: openjdk:8
caches:
- gradle
size: 2x # double resources available for this step to 8G
script:
- apt-get update
- apt-get install zip
- cd config/geb
- ./gradlew -DBASE_URL=qa2 clean BSchrome_win # This step fails
- cd build/reports
- zip -r testresult.zip BSchrome_winTest
after-script: # On test execution completion or build failure, send test report to e-mail lists
- pipe: atlassian/email-notify:0.3.11
variables:
<<: *email-notify-config
TO: 'email@email.com'
SUBJECT: "Test result for QA2 environment"
BODY_PLAIN: |
Please find the attached test result report to the email.
ATTACHMENTS: config/geb/build/reports/testresult.zip
UPDATE:-
Found out that, My zip file includes a ".js" that's why I can't send it as an attachment,
One solution I think is to create an artifact and send a bitbucket pipeline link in the email, but many business people have not accessed to repo
Another solution could be to send it as a drive attachment. I like this one but I am not sure how to send zip file as a drive attachment using "atlassian/email-notify:0.3.11" ?
Hello @Shubhendu Pandey , thank you for reporting.
As a workaround I can propose two solutions:
- zip archive without executable files , due to security , indeed, you are right, google does not allow such files to prevent some malware https://support.google.com/mail/answer/6584
- or send drive link in a message if this satisfy your case
It is also a good idea for writing custom pipe that will be uploading your archive to drive. Follow this guide How to write custom pipe
I implemented a different report that doesn't create a.js file. I will checkout the custom pipe.Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.