Receive email from AWS SES then relay it to your desired destination.
WARNING: Currently this does not work with attachments.
git clone https://github.com/kdcio/aws-ses-email-relay.git
cd aws-ses-email-relay
npm i
npm i serverless -g
Create a config.{name}.yml
in the project root. Replace {name}
with your deployment name. eg. prod
config.prod.yml:
REGION: us-east-1
PROFILE: my-aws-profile
DESTINATION:
"[email protected]": [email protected]
"[email protected]": [email protected]
"default":
- [email protected]
- [email protected]
FROM: [email protected]
DESTINATION
is a mapping of recepient email to destination email. The destination email can be an array. default
is a catch all destination.
FROM
should be a fallback email address capable of sending emails via your AWS account.
Based on config above:
npm run deploy prod
Navigate to your SES Rule Sets in AWS Console. In you rule, select SNS. Then SNS topic as aws-ses-email-relay-prod. Hit Save Rule
and you should ready to go.
npm run remove prod
cd ..
rm -fR aws-ses-email-relay