A nodemailer-based mailing service for @atlas.js


10583.0.03 years ago4 years agoMinified + gzip package size for @atlas.js/nodemailer in KB



A nodemailer-based mailing service for @atlas.js.


npm i @atlas.js/nodemailer


import { Atlas } from '@atlas.js/atlas'
import * as Nodemailer from '@atlas.js/nodemailer'

const atlas = new Atlas({
  config: {
    services: {
      email: {
        // The transport module to be used
        transport: require('nodemailer-ses-transport'),
        // Alternatively, just pass the module's name
        transport: 'nodemailer-ses-transport',
        // These options are passed to the transport module unmodified, so go
        // read the transport's docs as to what you can set here!
        options: {},
        // An array of plugins to add to nodemailer
        plugins: [{
          // Nodemailer's event to which the plugin should be added
          event: 'compile',
          // The plugin module to use
          plugin: require('nodemailer-html-to-text'),
          // Alternatively, just pass the module's name
          plugin: 'nodemailer-html-to-text',
          // These options are passed directly to the plugin function
          options: {},
atlas.service('email', Nodemailer.Service)
await atlas.start()

// The email service is now available here:

In addition to having the standard, callback-based sendMail() function available, you can use a custom async send() method:

await atlas.services.email.send({ to: 'test@example.com' })


See the LICENSE file for information.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.