Sending Emails with Node.js

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • emailjs

    html emails and attachments to any smtp server with nodejs

  • So, the main difference is that in Emailjs you will use MIME type to work with attachments, while in Nodemailer you use strings.

  • email-templates

    Discontinued Create, preview (in the browser and in the iOS Simulator), and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more! Made for @forwardemail and @ladjs. [Moved to: https://github.com/forwardemail/email-templates] (by niftylettuce)

  • Another quite popular package is email-templates. As you can see from the name, this package is designed for creating various custom templates for Node.js. It features support for automatic inline CSS, stylesheets, embedded images, and fonts. Also, it has an email preview option. The email templates package was made by the creator of the Lad framework. So it’s recommended to use it with Lad.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • mailgen

    A Node.js package that generates clean, responsive HTML e-mails for sending transactional mail.

  • One more package worth mentioning here is Mailgen. It is aimed at creating HTML templates for transactional emails. There is a note on Github, that with Mailgen you can “Programmatically create beautiful emails using plain old JavaScript.” The package includes several open-source themes as well as supports custom elements like tables, action buttons, etc. It is your choice how to send an email created with Mailgen, but they recommend checking out Nodemailer for this purpose.

  • berry

    📦🐈 Active development trunk for Yarn ⚒

  • yarn:

  • mailtrap-nodejs

    Official mailtrap.io Node.js client

  • Before we dive into reviewing how dynamic content works with HTML emails, it’s worth mentioning a new package that was just released in June 2022. Mailtrap’s very own sending package! Mailtrap provides both sending and testing functionality, and we always aim at saving everyone time and simply making life easier. With that in mind, it only made sense for us to make a package that allows developers to add a sending functionality to a Node.js application quickly. Additionally, it offers integration with the official API for Mailtrap and will be integrated with Nodemailer in the near future.

  • lad

    Node.js framework made by a former @expressjs TC and @koajs team member. Built for @forwardemail, @spamscanner, @breejs, @cabinjs, and @lassjs.

  • Another quite popular package is email-templates. As you can see from the name, this package is designed for creating various custom templates for Node.js. It features support for automatic inline CSS, stylesheets, embedded images, and fonts. Also, it has an email preview option. The email templates package was made by the creator of the Lad framework. So it’s recommended to use it with Lad.

  • email-templates

    Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.

  • Let’s experiment with the email-templates package. It has several interesting features:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • ESLint

    Find and fix problems in your JavaScript code.

  • If you want to find any issues that can lead to bugs or other inconsistencies use yarn lint with ESLint.

  • Jade

    Pug – robust, elegant, feature rich template engine for Node.js

  • First of all, let’s create our templates, for a frequently occurring scenario: new user registration. In this example, we are working with the default option (for more details and samples of using Pug, refer to Github.)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts