Skip to content

Lambda function connected to an SQS queue that sends emails using message information.

Notifications You must be signed in to change notification settings

DynamoCode/DynamoCode.EmailSender

Repository files navigation

DynamoCode.EmailSender

Deploy-AWS

This repository contains a Lambda function that is connected to an SQS queue to receive messages and send emails based on the information.

The credentials to access SMTP server are expected to stored in SSM Parameter Store. The parameter values are prefixed with DynamoCode.EmailSender which corresponds to the AppName value. It can be overridden at deploy time as a template parameter.

/DynamoCode.EmailSender/SmtpSettings/Server
/DynamoCode.EmailSender/SmtpSettings/Port
/DynamoCode.EmailSender/SmtpSettings/Username
/DynamoCode.EmailSender/SmtpSettings/Password
/DynamoCode.EmailSender/SmtpSettings/EnableSsl

Message format

{
    "FromEmail": "from@example.com", 
    "FromName": "My App Test",
    "ToEmail": "me@example.com",
    "Subject": "test from lambda SQS",
    "Body": "Text to send in an email body. <br/> Here is a <a href='www.example.com'>link</a> to test HTML"
}

Prerequisites

Build

sam build

Deploy

Update file samconfig.toml accordingly and then run

sam deploy

Alternatively just run

sam deploy --guided

About

Lambda function connected to an SQS queue that sends emails using message information.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages