serverless-ses-mjml

0.1.1 • Public • Published

Serverless-SES-MJML

Serverless plugin that allows you to build responsive email templates in mjml.


Installation

Install the plugin via Yarn (recommended)

yarn add serverless-ses-mjml

or via NPM

npm install serverless-ses-mjml

Configuring the plugin

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 

Usage

serverless deploy

This command will deploy all SES template resources in the same CloudFormation template used by the other serverless resources.

serverless preview-template --template Template

This command will convert your mjml template to html and open it in your browser.

Issues

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.

Credits

Thanks to sid88in and everyone else who built the serverless-appsync-plugin. Your code was consulted often while I made this one. Cheers!

Readme

Keywords

none

Package Sidebar

Install

npm i serverless-ses-mjml

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

5.08 kB

Total Files

4

Last publish

Collaborators

  • maddijoyce