Skip to content

Creating and updating email templates

Kenan Scott edited this page Dec 18, 2017 · 4 revisions

The email templates are managed manually. All values correspond to the AWS CLI ses create-template and ses update-template commands.

  • TemplateName: The name of the email template to be created or updated. Note that the email template name is not affected by the name of the template file.
  • SubjectPart: The subject of the email.
  • HtmlPart: The body of the email in HTML. Both HtmlPart and TextPart should be included to maximize compatibility.
  • TextPart: The body of the email in plaintext. Both HtmlPart and TextPart should be included to maximize compatibility.

Text surrounded by two curly braces, such as {{fromname}} are variables which are filled in with data from the API call, in this case, determined by the TemplateData key in the params variable, on the sendTemplatedEmail function in reply.js. Currently, only the {{fromname}} variable can be used, and is set in template-map.json

When you need to change the text, be sure to change both HtmlPart and TextPart accordingly.

Create an email template

  1. Install AWS CLI
  2. Configure AWS CLI, setting the region to to the same region that the CloudFormation stack has or will be deployed to.
  3. Clone the commitment-form-processor repository.
  4. From the responses directory, run aws ses create-template --cli-input-json file://EnRecommitmentResponse.json, replacing the filename for the template file that you wish to create.

Update an email template

  1. Install AWS CLI
  2. Configure AWS CLI, setting the region to to the same region that the CloudFormation stack has or will be deployed to.
  3. Clone the commitment-form-processor repository.
  4. From the responses directory, run aws ses update-template --cli-input-json file://EnRecommitmentResponse.json, replacing the filename for the template file that you wish to update.

Clone this wiki locally