Skip to content

Commit

Permalink
Fix:nodemailer transport object only use secure: true when port is 465
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Apr 25, 2024
1 parent 00bc50c commit bd1309b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/objects/settings/EmailSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ class EmailSettings {
host: this.host,
secure: this.secure
}
// Only set to true for port 465 (https://nodemailer.com/smtp/#tls-options)
if (this.port !== 465) {
payload.secure = false
}
if (this.port) payload.port = this.port
if (this.user && this.pass !== undefined) {
payload.auth = {
Expand Down

0 comments on commit bd1309b

Please sign in to comment.