npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

hemera-mail

5.0.1 • Public • Published

Hemera-mail package

npm styled with prettier

This is a plugin to mail via SMTP in Hemera. It's use Nodemailer as client library. The parameters are passed one-to-one so look in the nodemailer documentation if you want to configure something.

Usage

const hemera = new Hemera(nats)
hemera.use(require('hemera-mail'), {
  transport: // use here the nodemailer transport plugin of your choice, default is jsonTransport
})

Requirements

  • Node.js 6+

How to add attachments ?

As long as your content TEXT, HTML is very small (A typical 80-word plain text message is around 10 KB.) it's no problem to transfer it over NATS. Transfering big files in a distributed system is in general an anti-pattern because it will affect the latency of your network and can result in cascading failures. In practice, we recommend to create an API Gateway which is responsible to handle file uploads. The files can be stored in a distributed object storage like Amazon S3 or opensource alternatives Rook, Minio. The developer should only work with ID's or Url's.

Lots of mail services are providing an interface to manage email templates this is a great feature because you don't have to send the template on every mail in line with the motto "Buy it and stick to your business".

Keywords

none

install

npm i hemera-mail

Downloadsweekly downloads

74

version

5.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability