File tree Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,40 @@ jobs:
5555 # This step should always run, even if previous steps fail
5656 if : always()
5757
58- # Step to send email with the zip report
58+ # Step to send email with the zip report using SendGrid API
5959 - name : Send email with zip report
6060 run : |
61- echo "Sending email with zip report"
62- echo "This is the body of the email" | mutt -s "Subject: Playwright Test Report" -a html-report.zip codendeavor@gmail.com
61+ curl -X "POST" "https://api.sendgrid.com/v3/mail/send" \
62+ -H 'Authorization: Bearer YOUR_SENDGRID_API_KEY' \
63+ -H 'Content-Type: application/json' \
64+ -d $'{
65+ "personalizations": [
66+ {
67+ "to": [
68+ {
69+ "email": "recipient@example.com"
70+ }
71+ ],
72+ "subject": "Playwright Test Report"
73+ }
74+ ],
75+ "from": {
76+ "email": "sender@example.com"
77+ },
78+ "content": [
79+ {
80+ "type": "text/plain",
81+ "value": "This is the body of the email."
82+ }
83+ ],
84+ "attachments": [
85+ {
86+ "content": "'"$(base64 html-report.zip)"'",
87+ "filename": "html-report.zip",
88+ "type": "application/zip",
89+ "disposition": "attachment"
90+ }
91+ ]
92+ }'
6393 # This step should only run if the previous steps were successful
6494 if : success()
You can’t perform that action at this time.
0 commit comments