diff options
author | HybridSarcasm <7719414+HybridSarcasm@users.noreply.github.com> | 2024-07-26 12:22:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 12:22:30 -0400 |
commit | 69964588a8a9a98bcc59bb3339477c45f9111882 (patch) | |
tree | 6b38ea6d0043f4ccf40c7bfe5f26229a96aa5c80 /src/lib/email.ts | |
parent | 68f5ce96ee19c77d46ddcdd18eefad6257cd47fa (diff) |
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.
Diffstat (limited to 'src/lib/email.ts')
-rw-r--r-- | src/lib/email.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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<boolean> => { 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); |