udpate smtp module to take a full smtp connection string

This commit is contained in:
riley
2016-11-16 14:38:29 -07:00
parent e027a162d6
commit 967472ea74
+2 -2
View File
@@ -1,14 +1,14 @@
const nodemailer = require('nodemailer');
const debug = require('debug')('talk:mail');
if (!process.env.TALK_SENDGRID_APIKEY) {
if (!process.env.TALK_SMTP_STRING) {
debug('\n///////////////////////////////////////////////////////////////\n' +
'/// TALK_SENDGRID_APIKEY should be defined if you would ///\n' +
'/// like to send password reset emails from Talk ///\n' +
'///////////////////////////////////////////////////////////////');
}
const transporter = nodemailer.createTransport(`smtps://apikey:${process.env.TALK_SENDGRID_APIKEY}@smtp.sendgrid.net`);
const transporter = nodemailer.createTransport(process.env.TALK_SMTP_STRING);
const mailer = {
/**