Name: emailjs-pgp-builder
Owner: emailJS
Description: Builds PGP/MIME, no magic/encryption/unicorns included.
Created: 2016-04-24 23:58:57.0
Updated: 2018-05-13 21:57:01.0
Pushed: 2018-05-15 07:27:29.0
Homepage: null
Size: 7
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Builds PGP/MIME, no magic/encryption included.
t PGPBuilder = require('emailjs-pgp-builder');
t builder = new PGPBuilder();
This is the expected data format…
message = {
subject: 'foo',
date: new Date(),
from: [{
name: 'Fred Foo',
address: 'fred@foobar.bar'
}],
to: [{
name: 'Bla Foo',
address: 'bla@foobar.bar'
}],
cc: [{
name: 'Bli Foo',
address: 'bli@foobar.bar'
}],
bcc: [{
name: 'Blu Foo',
address: 'Blu@foobar.bar'
}],
id: '368357@foobar.bar',
inReplyTo: '112342356@foobar.bar',
text: 'asd',
html: '<html><head></head><body>asd</body></html>',
attachments: []
mimeRoot = builder.buildPlaintext(message);
rypto not included
signature = pgpsign(mimeRoot.build());
der.buildSigned(message, mimeRoot, signature);
ind the results of the operation here:
ole.log(message.raw)
ole.log(message.smtpEnvelope)
NB! pgpsign is whatever you use to PGP-sign the content.
mimeRoot = builder.buildPlaintext(message);
rypto not included
ciphertext = pgpencrypt(mimeRoot.build());
der.buildEncrypted(message, ciphertext);
ind the results of the operation here:
ole.log(message.raw)
ole.log(message.smtpEnvelope)
NB! pgpencrypt is whatever you use to PGP-encrypt the content.
MIT