MJML, Handlebars & Sendgrid for building responsive mails
- Clone the repository
- Run
npm install
- Add your Sendgrid API Key in
.env
file - Add your Recipent Email
.env
file - Run
node example.js
- The app loads
.env
environment configuration. - The view in
views/example.hbs
is loaded. - The loaded view (now as a string) is converted to an Handlebars Template.
- Then the template replaces the variables with the values in the
userInfo
object. - The Handlebar Template is converted to HTML.
- The HTML is passed to Sendgrid to generate the email.