Simple Email Service (SES)¶
Configuration¶
Configuration sets¶
Access Configuration sets
Click the Create set button
Configuration set name:
credere
Click the Event destinations tab
Click the Add destination button
See also
- Select event types
Sending and delivery: Check all
- Specify destination
Destination type: Check “Amazon CloudWatch”
Name:
crede-metrics-to-cloudwatch(sic)Value source: Select “Message tag”
Dimension name:
ses:configuration-setDefault value:
crede-metrics-to-cloudwatch(sic)
See also
- Select event types
- Sending and delivery: Check:
Rendering failures
Rejects
Delivery delays
- Specify destination
Destination type: Check “Amazon SNS”
Name:
credere-noreply-open-contracting-orgSNS topic:
credere-noreply-open-contracting-org
See also
Identities¶
Verify an email address (
credere@noreply.open-contracting.org)- Authentication
- Notifications
Set the bounce and complaint feedback to the Simple Notification Service (SNS) topic
Check “Include original email headers” for both
- Configuration set
Assign
credereas the default configuration set
See also
Email templates¶
One-time setup
Run the configure command to set the administrative user’s credentials and region:
aws configure --profile credere-admin
The files matching the pattern email_templates/aws_* are used as email templates. They serve as layouts for all messages, including styles, a header, a footer, and a {{CONTENT}} tag.
aws_main.htmlaws_main_es.html
When deploying for the first time, and after changing these files:
Create the input JSON for each template:
python -m app dev cli-input-json credere-main-en email_templates/aws_main.html > credere-main-en.json python -m app dev cli-input-json credere-main-es email_templates/aws_main_es.html > credere-main-es.json
Run the ses create-template command with the administrative user:
aws ses create-template --profile credere-admin --cli-input-json file://credere-main-en.json aws ses create-template --profile credere-admin --cli-input-json file://credere-main-es.json
Tasks¶
Get an email template¶
Use the CLI (the console only lists templates):
aws ses get-template --profile credere-admin --template-name credere-main-es
Preview a templated email¶
Create an input JSON file, using the skeleton from:
aws ses test-render-template --generate-cli-skeleton
For example:
{ "TemplateName": "credere-main-es", "TemplateData": "{\"SUBJECT\":\"my subject\",\"CONTENT\":\"my content\"}" }
Run the ses test-render-template command, for example:
aws ses test-render-template --profile credere-admin --cli-input-json file://test.json
Send a templated email¶
Create an input JSON file, using the skeleton from:
aws ses send-templated-email --generate-cli-skeleton
For example:
{ "Source": "Credere_Test <credere@noreply.open-contracting.org>", "Destination": { "ToAddresses": ["me@open-contracting.org"] }, "ReplyToAddresses": ["test@open-contracting.org"], "Template": "credere-main-es", "TemplateData": "{\"SUBJECT\":\"my subject\",\"CONTENT\":\"my content\"}" }
Run the ses send-templated-email command, example:
aws ses send-templated-email --profile credere-admin --cli-input-json file://test.json