Skip to content

Add Template to Emails

0

When sending emails from Amazon SES, is it possible to add an email template/footer to the bottom of all emails when sending from a specific user without using an API command? I have found the guide below which indicates this is possible, however when creating a policy I'm unsure how to specify a specific template I have created. https://repost.aws/questions/QUspZnqFjOQFSgm0ZxngAZig/seeking-guidance-on-adding-a-footer-to-outbound-verified-emails-with-aws-ses-or-lambda

1 Answer
0

Templates are managed via API call. The following page covers setup and use of templates. https://docs.aws.amazon.com/ses/latest/dg/send-personalized-email-api.html

You specify the template by name, specifically via "Template": "MyTemplate", when creating the email JSON file such as the following.

{
  "Source":"Mary Major <mary.major@example.com>",
  "Template": "MyTemplate",
  "ConfigurationSetName": "ConfigSet",
  "Destination": {
    "ToAddresses": [ "alejandro.rosalez@example.com"
    ]
  },
  "TemplateData": "{ \"name\":\"Alejandro\", \"favoriteanimal\": \"alligator\" }"
}

To send the email call the API and reference your prepared JSON file as below.

aws ses send-templated-email --cli-input-json file://myemail.json

Hope this helps.

AWS
EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
  • We plan to use Amazon SES to send emails directly from our ERP package due to the large volume of emails being sent, unfortunately our ERP package does not support API calls. Is there a way to create a footer with our company details in Amazon SES other than via an API call?

  • No, the only option for templates is the above API call.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.