remove sendgrid shim and use connection string

This commit is contained in:
riley
2016-11-16 14:00:33 -07:00
parent 81299e8add
commit e027a162d6
2 changed files with 1 additions and 8 deletions
-1
View File
@@ -46,7 +46,6 @@
"mongoose": "^4.6.5",
"morgan": "^1.7.0",
"nodemailer": "^2.6.4",
"nodemailer-sendgrid-transport": "^0.2.0",
"prompt": "^1.0.0",
"uuid": "^2.0.3"
},
+1 -7
View File
@@ -1,11 +1,5 @@
const nodemailer = require('nodemailer');
const sgTransport = require('nodemailer-sendgrid-transport');
const debug = require('debug')('talk:mail');
const options = {
auth: {
api_key: process.env.TALK_SENDGRID_APIKEY
}
};
if (!process.env.TALK_SENDGRID_APIKEY) {
debug('\n///////////////////////////////////////////////////////////////\n' +
@@ -14,7 +8,7 @@ if (!process.env.TALK_SENDGRID_APIKEY) {
'///////////////////////////////////////////////////////////////');
}
const transporter = nodemailer.createTransport(sgTransport(options));
const transporter = nodemailer.createTransport(`smtps://apikey:${process.env.TALK_SENDGRID_APIKEY}@smtp.sendgrid.net`);
const mailer = {
/**