Send Email via AWS SES directly from your GitHub workflows.
- AWS Account
- Verified email or domain in AWS SES
- AWS IAM user with
SES:SendEmail
permissions
The following environment variables are required:
Name | Description |
---|---|
AWS_ACCESS_KEY_ID |
AWS Access Key ID |
AWS_SECRET_ACCESS_KEY |
AWS Secret Access Key |
AWS_DEFAULT_REGION |
AWS Region |
Name | Description | Required | Multiple Values Allowed |
---|---|---|---|
bcc |
Email address of the BCC recipient | No | Yes |
body |
Body of the email | No | No |
body_html |
Body of the email in HTML format | No | No |
cc |
Email address of the CC recipient | No | Yes |
from |
Email address of the sender | Yes | No |
reply_to |
Email address to reply to | No | Yes |
subject |
Subject of the email | Yes | No |
to |
Email address of the recipient | Yes | Yes |
Here is a simple example that demonstrates how to use this action:
name: Send Email via AWS SES
on:
push:
branches:
- main
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'ap-south-1'
jobs:
send-email:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Send email using AWS SES
uses: dsfx3d/action-aws-ses@v1
with:
to: '[email protected],[email protected]'
from: '[email protected]'
subject: 'GitHub Action Test'
body: 'This is a test email sent from a GitHub Action.'
cc: '[email protected],[email protected]'
bcc: '[email protected],[email protected]'
reply_to: '[email protected],[email protected]'
body_html: '<h1>This is a test email</h1>'
This project is licensed under the MIT License - see the LICENSE.md file for details.