mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-04-05 08:54:17 -04:00
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:
@@ -24,7 +24,10 @@ const bytes = require('../utils/bytes');
|
|||||||
const transport = nodemailer.createTransport({
|
const transport = nodemailer.createTransport({
|
||||||
host: variables.smtpHost,
|
host: variables.smtpHost,
|
||||||
port: parseInt(variables.smtpPort),
|
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: {
|
auth: {
|
||||||
user: variables.smtpUsername,
|
user: variables.smtpUsername,
|
||||||
pass: variables.smtpPassword
|
pass: variables.smtpPassword
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module.exports = {
|
|||||||
smtpFrom: config('smtp_from') || process.env.SMTP_FROM || '',
|
smtpFrom: config('smtp_from') || process.env.SMTP_FROM || '',
|
||||||
smtpHost: config('smtp_host') || process.env.SMTP_HOST || '',
|
smtpHost: config('smtp_host') || process.env.SMTP_HOST || '',
|
||||||
smtpPort: config('smtp_port') || process.env.SMTP_PORT || 25,
|
smtpPort: config('smtp_port') || process.env.SMTP_PORT || 25,
|
||||||
smtpSecure: config('smtp_secure') || process.env.SMTP_SECURE || false,
|
smtpSecure: config('smtp_secure') || (process.env.SMTP_SECURE === 'true') || false,
|
||||||
smtpUsername: config('smtp_username') || process.env.SMTP_USERNAME || '',
|
smtpUsername: config('smtp_username') || process.env.SMTP_USERNAME || '',
|
||||||
smtpPassword: config('smtp_password') || process.env.SMTP_PASSWORD || '',
|
smtpPassword: config('smtp_password') || process.env.SMTP_PASSWORD || '',
|
||||||
logLevel: config('log_level') || process.env.LOG_LEVEL || 'info',
|
logLevel: config('log_level') || process.env.LOG_LEVEL || 'info',
|
||||||
|
|||||||
Reference in New Issue
Block a user