nodemailer/nodemailer-openpgp

Name: nodemailer-openpgp

Owner: nodemailer

Description: Encrypt Nodemailer messages with PGP

Created: 2016-04-16 15:57:55.0

Updated: 2018-05-13 19:39:06.0

Pushed: 2017-08-18 13:21:41.0

Homepage: null

Size: 13

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OpenPGP module for Nodemailer

This module allows you to send PGP encrypted messages using Nodemailer. Generated messages are in PGP/MIME format and currently it is only possible to encrypt or encrypt+sign but not just sign messages.

Build Status

Install

Install from npm

npm install nodemailer-openpgp --save
Usage

Load the openpgpEncrypt function

openpgpEncrypt = require('nodemailer-openpgp').openpgpEncrypt;

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

sporter.use('stream', openpgpEncrypt(options));

Where

To encrypt outgoing messages add encryptionKeys array that holds the public keys used to encrypt the message.

Example
nodemailer = require('nodemailer');
transporter = nodemailer.createTransport();
openpgpEncrypt = require('nodemailer-openpgp').openpgpEncrypt;
sporter.use('stream', openpgpEncrypt());
sporter.sendMail({
from: 'sender@address',
to: 'receiver@address',
subject: 'hello',
text: 'hello world!',
encryptionKeys: ['-----BEGIN PGP PUBLIC KEY BLOCK-----?']
unction(err, response) {
console.log(err || response);

License

LGPL-3.0


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.