fix: removed invalid options for the sendmail transport (#8576)

* Removed invalid options for the sendmail transport that were causing Nodemailer to return the SMTPTransport instead.

* Removed options for rate limiting in admin email interface. Added new option for toggling whether to use pooled connections.
This commit is contained in:
Kyle Farris
2020-08-26 10:46:59 -04:00
committed by GitHub
parent 6e805c1be7
commit 2b785628e7
4 changed files with 18 additions and 23 deletions

View File

@@ -25,9 +25,6 @@ Emailer.transports = {
sendmail: nodemailer.createTransport({
sendmail: true,
newline: 'unix',
pool: true,
rateLimit: meta.config['email:sendmail:rateLimit'],
rateDelta: meta.config['email:sendmail:rateDelta'],
}),
smtp: undefined,
};
@@ -66,7 +63,9 @@ Emailer.setupFallbackTransport = function (config) {
winston.verbose('[emailer] Setting up SMTP fallback transport');
// Enable Gmail transport if enabled in ACP
if (parseInt(config['email:smtpTransport:enabled'], 10) === 1) {
var smtpOptions = {};
var smtpOptions = {
pool: config['email:smtpTransport:pool'],
};
if (config['email:smtpTransport:user'] || config['email:smtpTransport:pass']) {
smtpOptions.auth = {