Leonardo Savio

I'm Leonardo Savio, a Cloud Architect from Brazil, passionate about AI, backend development, and solving complex problems through innovative solutions. I've been working as a developer since 2010, constantly evolving with the latest technologies.

Blog

Amazon SES adds inline template support to send email APIs

Amazon SES adds inline template support

Introduction

Posted on: Aug 4, 2024

Amazon Simple Email Service (SES) now allows customers to provide email templates directly within the SendBulkEmail or SendEmail API request. SES will use … More on:

Link to AWS post: Click here Link to AWS doc: Click here


Example Usage

  • Templates:
  1. Stored template code example
{
    "FromEmailAddress": "Mary Major <mary.major@example.com>",
    "Destination": {
        "ToAddresses": [
            "alejandro.rosalez@example.com", "jimmy.jet@example.com"
        ]
    },
    "Content": {
        "Template": {
            "TemplateName": "MyTemplate",
            "TemplateData": "{ \"name\":\"Alejandro\", \"favoriteanimal\": \"alligator\" }"
        }
    },
    "ConfigurationSetName": "ConfigSet"
}  
  1. Inline template code example
{
    "FromEmailAddress": "Mary Major <mary.major@example.com>",
    "Destination": {
        "ToAddresses": [
            "alejandro.rosalez@example.com", "jimmy.jet@example.com"
        ]
    },
    "Content": {
        "Template": {
            "TemplateContent": {
                "Subject": "Greetings, !",
                "Text": "Dear ,\r\nYour favorite animal is .",
                "Html": "<h1>Hello ,</h1><p>Your favorite animal is .</p>"
            },
            "TemplateData": "{ \"name\":\"Alejandro\", \"favoriteanimal\": \"alligator\" }"
        }
    },
    "ConfigurationSetName": "ConfigSet"
}