mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
remove sendgrid shim and use connection string
This commit is contained in:
@@ -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
@@ -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 = {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user