![]() |
This open source module is sponsored and supported by Voxgig. |
|---|
npm install seneca@^4 @seneca/entity @seneca/mail
Requires Node.js 24 or later and Seneca 4. The mail history (option
history, on by default) is saved as sys/mailhist entities, so it needs
@seneca/entity 29 or later and a store. @seneca/entity loads its
in-memory store by default.
seneca
.use('@seneca/entity')
.use('@seneca/mail', {
email: { send: true }
})
See test/ for usage examples.
Send emails with templates from Seneca microservices.
If you're using this module and need help, you can:
- Post a github issue
- Tweet to @senecajs
- Ask on the Gitter
test: boolean false : Test mode.history: boolean true : Save mail history tosys/mailhistentity.makehist: function : Add properties tosys/mailhistentity.logmail: boolean true : Log mail sending at info level.email.send: boolean false : Send email (for safety, off by default).email.preview: boolean false : Preview email.
Set plugin options when loading with:
seneca.use('mail', { name: value, ... })
Note: foo.bar in the list above means
{ foo: { bar: ... } }
Other email options are passed to
email-templates and
nodemailer, for example email.message for default message fields, or
email.transport as { name, options }, which loads the transport
package nodemailer-<name>.
No description provided.
No description provided.
The [Senecajs org][] encourages open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.
npm run test
Supports multiple email transports via nodemailer.
