1.3.7 • Published 4 days ago

nodemailer-smime-plus v1.3.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

Nodemailer plugin to sign mail using S/MIME

This is an up-to-date version of the original nodemailer-smime package.

Install

Install from npm

npm install nodemailer-smime-plus --save

Usage

Load the nodemailer-smime-plus plugin

import smime from 'nodemailer-smime-plus';

Attach it as a 'stream' handler for a nodemailer transport object

const options = {
  cert: '<PEM formatted cert>',
  chain: [
    '<PEM formatted cert>',
  ],
  key: '<PEM formatted key>',
};
transporter.use('stream', smime(options));

Options

  • cert - PEM formatted SMIME certificate to sign/bundle mail with
  • chain - array of PEM formatted certificates to bundle
  • key - PEM formatted private key associated with certificate

Example

import nodemailer from 'nodemailer';
import smime from 'nodemailer-smime-plus';

const transporter = nodemailer.createTransport();
const options = {
  cert: '<PEM formatted cert>',
  chain: [
    '<PEM formatted cert>',
  ],
  key: '<PEM formatted key>',
};
transporter.use('stream', smime(options));
transporter.sendMail({
  from: 'me@example.com',
  to: 'receiver@example.com',
  html: '<b>Hello world!</b>'
});

License

MIT

1.3.7

4 days ago

1.3.6

4 days ago

1.3.5

4 days ago

1.3.4

4 days ago

1.3.3

4 months ago

1.3.2

4 months ago

1.3.1

4 months ago

1.3.0

4 months ago

1.2.2

5 months ago

1.2.1

5 months ago

1.2.0

5 months ago

1.1.0

5 months ago