mirror of
https://github.com/wassname/talk.git
synced 2026-07-29 11:28:24 +08:00
make the provider an env var
This commit is contained in:
+5
-3
@@ -2,7 +2,8 @@ const nodemailer = require('nodemailer');
|
||||
|
||||
const smtpRequiredProps = [
|
||||
'TALK_SMTP_USERNAME',
|
||||
'TALK_SMTP_PASSWORD'
|
||||
'TALK_SMTP_PASSWORD',
|
||||
'TALK_SMTP_PROVIDER'
|
||||
];
|
||||
|
||||
smtpRequiredProps.forEach(prop => {
|
||||
@@ -11,9 +12,10 @@ smtpRequiredProps.forEach(prop => {
|
||||
}
|
||||
});
|
||||
|
||||
// https://github.com/nodemailer/nodemailer-wellknown#supported-services
|
||||
const options = {
|
||||
service: 'SendGrid',
|
||||
// list of providers here:
|
||||
// https://github.com/nodemailer/nodemailer-wellknown#supported-services
|
||||
service: process.env.TALK_SMTP_PROVIDER,
|
||||
auth: {
|
||||
user: process.env.TALK_SMTP_USERNAME,
|
||||
pass: process.env.TALK_SMTP_PASSWORD
|
||||
|
||||
Reference in New Issue
Block a user