Serverless plugin that allows you to build responsive email templates in mjml.
Install the plugin via Yarn (recommended)
yarn add serverless-ses-mjml
or via NPM
npm install serverless-ses-mjml
Add serverless-ses-mjml
to the plugins section of serverless.yml
plugins:
- serverless-ses-mjml
Add the following example config to the custom section of serverless.yml
custom:
sesTemplates:
location: # defaults to email-templates
templates:
- name: # template name
subject: # subject line
mjml: # mjml file name
text: # text file name
This command will deploy all SES template resources in the same CloudFormation template used by the other serverless resources.
This command will convert your mjml template to html and open it in your browser.
SES is only available in a limited number of regions. If you receive this uninformative error The CloudFormation template is invalid: Template format error: Unrecognized resource types: [AWS::SES::Template]
, it possibly means you're trying to deploy an SES template in a region where it's not possible.
Thanks to sid88in and everyone else who built the serverless-appsync-plugin. Your code was consulted often while I made this one. Cheers!