Skip to content


Extends: @apostrophecms/module ℹ️

This module manages general email functionality that Apostrophe modules use. The most significant feature is the nodemailer option, which is used to configure the Nodemailer third-party module.


fromStringThe default "from" address," either as the email address or with full name (e.g., '"Jane Doe" <>').
nodemailerObjectAn options object for Nodemailer. Required for sending email unless the transport is directly set on self.transport. It is passed to nodemailer's createTransport method. See the Nodemailer documentation.


If using a pre-configured Nodemailer transport package that must be passed to the Nodemailer createTransport method (e.g., nodemailer-mailjet-transport, nodemailer-mailgun-transport), you may assign that package to the nodemailer option as well.

```javascript const mailjetTransport = require('nodemailer-mailjet-transport');

module.exports = { options: { nodemailer: mailjetTransport({ /// Mailjet configuration... }) } };

<template v-slot:caption>

If needed, you may assign the *fully* created transport directly to `self.transport` and omit the `nodemailer` option.

const nodemailer = require('nodemailer');
const mailjetTransport = require('nodemailer-mailjet-transport');

module.exports = {
  init(self) {
    self.transport = nodemailer.createTransport(mailjetTransport({
      // Mailjet configuration...
    }), {
      // A full set of message defaults...