test if user/pass config is set and if not set auth: null

This commit is contained in:
Tom Ribbens 2025-07-18 17:09:22 +02:00 committed by GitHub
parent b67611094e
commit 676aa1358d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,10 +18,10 @@ function createEmailClient() {
host: emailConfig.smtp_host,
port: emailConfig.smtp_port,
secure: emailConfig.smtp_secure || false,
auth: {
auth: (emailConfig.smtp_user && emailConfig.smtp_pass) ? {
user: emailConfig.smtp_user,
pass: emailConfig.smtp_pass
}
} : null
} as SMTPTransport.Options;
if (emailConfig.smtp_tls_reject_unauthorized !== undefined) {