Added VERP support
This commit is contained in:
parent
06d5e0d9bf
commit
e5e71e0407
13 changed files with 374 additions and 148 deletions
|
@ -82,7 +82,7 @@ function getTemplate(template, callback) {
|
|||
}
|
||||
|
||||
function createMailer(callback) {
|
||||
settings.list(['smtpHostname', 'smtpPort', 'smtpEncryption', 'smtpUser', 'smtpPass', 'smtpLog', 'smtpMaxConnections', 'smtpMaxMessages'], (err, configItems) => {
|
||||
settings.list(['smtpHostname', 'smtpPort', 'smtpEncryption', 'smtpUser', 'smtpPass', 'smtpLog', 'smtpDisableAuth', 'smtpMaxConnections', 'smtpMaxMessages', 'smtpSelfSigned'], (err, configItems) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ function createMailer(callback) {
|
|||
port: Number(configItems.smtpPort) || false,
|
||||
secure: configItems.smtpEncryption === 'TLS',
|
||||
ignoreTLS: configItems.smtpEncryption === 'NONE',
|
||||
auth: {
|
||||
auth: configItems.smtpDisableAuth ? false : {
|
||||
user: configItems.smtpUser,
|
||||
pass: configItems.smtpPass
|
||||
},
|
||||
|
@ -103,7 +103,10 @@ function createMailer(callback) {
|
|||
error: log.info.bind(log, 'Mail')
|
||||
},
|
||||
maxConnections: Number(configItems.smtpMaxConnections),
|
||||
maxMessages: Number(configItems.smtpMaxMessages)
|
||||
maxMessages: Number(configItems.smtpMaxMessages),
|
||||
tls: {
|
||||
rejectUnauthorized: !configItems.smtpSelfSigned
|
||||
}
|
||||
});
|
||||
|
||||
return callback(null, module.exports.transport);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue