This is a simple implementation zero code needed for an email forwarder using Serverless, AWS SES.
Note: create a JSON file with the stage name at config folder [e.g. prod.json]
{
"BUCKET_NAME": "fowarder-emails", // Bucket name {BUCKET_NAME}-{STAGE}
"EMAIL_RECIPIENTS": [ // Email list to listen incoming messages
"me@andresmorelos.dev"
],
"DESTINATION": [ // Destination email list
"name@domain.tdl"
],
"SENDER": "name@domain.tdl" // Verified email that will send the email.
}
npm install
serverless deploy --stage [DEV/TEST/PROD/STAGE_NAME]
or
npm i
sls deploy --stage [DEV/TEST/PROD/STAGE_NAME]
- A domain verify at AWS SES service first is needed.
- A sender email verify at AWS SES service first is needed.
See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domain-procedure.html
See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses-procedure.html