nodemailer-openssl-smime
v1.1.3
Published
Nodemailer S/MIME encryption via OpenSSL
Downloads
151
Maintainers
Readme
Nodemailer S/MIME Encryption via OpenSSL
Installation
npm i nodemailer-openssl-smime --save
Usage
import { createTransport } from "nodemailer";
import smime from "nodemailer-openssl-smime";
const sendEncryptedEmail = async () => {
const transport = createTransport({
/* ... */
}).use("stream", smime({ recipient: "-----BEGIN CERTIFICATE-----..." }));
await transport.sendMail({
from: "[email protected]",
to: "[email protected]",
subject: "This is a test",
text: "Hello world",
});
};