Send email message with PGP inline not PGP/MIME

* Use OpenPGP.js directly instead of nodemailer-openpgp plugin
* Use native ES6 string templates instead of nodemailer template engine
This commit is contained in:
Tankred Hase
2017-08-19 17:06:36 +08:00
committed by Martin Hauck
parent 656aa9b6ed
commit 6ec72aef06
6 changed files with 57 additions and 64 deletions

View File

@@ -2,7 +2,7 @@
const config = require('config');
const Email = require('../../src/email/email');
const tpl = require('../../src/email/templates.json');
const tpl = require('../../src/email/templates');
describe('Email Integration Tests', function() {
this.timeout(20000);
@@ -38,8 +38,8 @@ describe('Email Integration Tests', function() {
describe("_sendHelper", () => {
it('should work', async () => {
const mailOptions = {
from: email._sender,
to: recipient,
from: {name: email._sender.name, address: email._sender.email},
to: {name: recipient.name, address: recipient.email},
subject: 'Hello ✔', // Subject line
text: 'Hello world 🐴', // plaintext body
html: '<b>Hello world 🐴</b>' // html body