hemera-mail

5.0.2 • 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".

Dependents (0)

Package Sidebar

Install

npm i hemera-mail

Weekly Downloads

0

Version

5.0.2

License

MIT

Unpacked Size

4.5 kB

Total Files

5

Last publish

Collaborators

  • starptech