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.gitcd aws-ses-email-relaynpm inpm i serverless -g
Create aconfig.{name}.yml
in the project root. Replace{name}
with your deployment name. eg.prod
config.prod.yml:
REGION:us-east-1PROFILE:my-aws-profileDESTINATION:"my.yahoo@receiving-email.com":my.admin@yahoo.com"my.gmail@receiving-email.com":my.admin@gmail.com"default": -my.admin@gmail.com -my.admin@yahoo.comFROM:my@receiving-email.com
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:
Navigate to your SES Rule Sets in AWS Console. In you rule, select SNS. Then SNS topic as aws-ses-email-relay-prod. HitSave Rule
and you should ready to go.
npm run remove prodcd ..rm -fR aws-ses-email-relay