Build. Validate. Deploy Emails in JavaScript.

Build. Validate. Deploy Emails in JavaScript.

Integrate transactional emails in your continuous deployment process

In an effort to satisfy GDPR requirements, it was apparent that I could no longer put off adding email integration to my app. Email marketing websites offered “beautiful, award-winning templates,” but what they lacked — what I craved — was the ability to maintain emails in the same way that I maintained the rest of my application: with changes tracked through GitHub so that it could undergo the same review and deploy process.

Environment

Your setup does not have to mirror mine exactly, but it is available to provide some context.

  • Monorepo using npm workspaces. I have a package containing my email templates and another package for backend functionality that integrates those emails. The important thing is that these packages remain in lock-step with each other, and the build scripts further enforce that they are deployed together.
  • GitHub Actions for continuous deployment. It doesn’t matter what you choose here — as long as you deploy emails as part of your backend.
  • Webpack for converting email templates into libraries. This part is pretty cool, and I can’t wait to show you.
  • MJML for creating templates. uilding HTML emails is a pain, and MJML simplifies it greatly.
  • MailerSend for creating transactional emails. Any service works fine, but one thing I like about it is that the API includes a strategy for variable interpolation. I use that feature to customize my emails.
  • Firebase Functions for sending transactional emails. Currently, I have a trigger for a user to request their data for download and another trigger for a user to delete their data. Both send emails to the user.

javascript react

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

Increase Performance of React Applications Via Array JavaScript Methods

Increase Performance of React Applications Via Array JavaScript Methods. We will create a simple event management application in the react to add, update, and delete an event.

Top VSCode Extensions for React, React Native, JavaScript and Productivity

Bunch of VSCode Extensions that improve quality of your coding time no matter what stack you are using. In this post, you'll see Top VSCode Extensions for React, React Native, JavaScript and Productivity

React cloneElement: A Better Way to Build a Component API Props in ES6 Javascript and Ts

Using the React cloneElement is a better way to build a component API props in ES6 Javascript and Typescript. Here's a tutorial on how to do so.

Qual a relação entre Java e JavaScript, C e C++, React e React Native

Qual a relação entre Java e JavaScript, C e C++, React e React Native