Skip to content

AWS SES

Martin Choutka edited this page Dec 29, 2021 · 1 revision

Templates

Templates are used to send emails to users. Each template has it's own TemplateName (which must be unique), SubjectPart, HtmlPart and TextPart. TextPart should contain the same content as HtmlPart minus the HTML tags.

CLI commands

  • Viewing a list of email templates: aws ses list-templates
  • Viewing the contents of a specific email template: aws ses get-template --template-name MyTemplate
  • Create: aws ses create-template --cli-input-json file://mytemplate.json
  • Update: aws ses update-template --cli-input-json file://path/to/update_template.json
  • Delete: aws ses delete-template --template-name MyTemplate

SendVerificationLink

It's used to send a verification link to the user's email after he has signed up on the website.

{
  "Template": {
    "TemplateName": "SendVerificationLink",
    "SubjectPart": "Greetings, {{email}}!",
    "HtmlPart": "<h1>Hello {{email}},</h1><p>For verifying your email <a href='{{verificationLink}}'>click here</a>.</p>",
    "TextPart": "Hello {{email}}, for verifying your email use this link {{verificationLink}}"
  }
}
Clone this wiki locally