Fixed SMTP_SECURE type check within variables.js. Removed smtpSecure checks from mail.js. Disable TLS certificate checks within mail.js since this could cause issues with self-hosted solutions

This commit is contained in:
Glenn de Haan
2024-10-08 10:24:45 +02:00
parent ac6f10de91
commit 9b48a97136
2 changed files with 5 additions and 2 deletions

View File

@@ -24,7 +24,10 @@ const bytes = require('../utils/bytes');
const transport = nodemailer.createTransport({
host: variables.smtpHost,
port: parseInt(variables.smtpPort),
secure: (variables.smtpSecure === 'true' || variables.smtpSecure === true),
secure: variables.smtpSecure,
tls: {
rejectUnauthorized: false // Skip TLS Certificate checks for Self-Hosted systems
},
auth: {
user: variables.smtpUsername,
pass: variables.smtpPassword