From 69964588a8a9a98bcc59bb3339477c45f9111882 Mon Sep 17 00:00:00 2001 From: HybridSarcasm <7719414+HybridSarcasm@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:22:30 -0400 Subject: Allow self-signed certs for SMTP server Added "tls:" property of 'rejectUnauthorized: false' to allow program to continue startup when SMTP certificates are not able to be validated against known trusted roots. --- src/lib/email.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/email.ts b/src/lib/email.ts index 3cf3156..f19e5dc 100644 --- a/src/lib/email.ts +++ b/src/lib/email.ts @@ -54,6 +54,10 @@ export const initEmailService = async (): Promise => { user: config.nodemailer?.smtp_username, pass: config.nodemailer?.smtp_password, }, + tls: { + // do not fail on invalid certs + rejectUnauthorized: false, + }, } as SMTPTransport.Options; const nodemailerTransporter = nodemailer.createTransport(nodemailerConfig); -- cgit v1.2.3