From 2d6666d69380d99d1339244b12145cab4475f1c2 Mon Sep 17 00:00:00 2001 From: Smiley3112 Date: Sat, 18 May 2024 14:02:21 +0100 Subject: [PATCH] feat: Add SMTP_NAME environment variable (#761) Closes #758 --- docker-compose-dev.yml | 1 + docker-compose.yml | 1 + server/api/hooks/smtp/index.js | 1 + server/config/custom.js | 1 + 4 files changed, 4 insertions(+) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index b3eccfd1c..f69938e11 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -39,6 +39,7 @@ services: # Email Notifications (https://nodemailer.com/smtp/) # - SMTP_HOST= # - SMTP_PORT=587 + # - SMTP_NAME= # - SMTP_SECURE=true # - SMTP_USER= # - SMTP_PASSWORD= diff --git a/docker-compose.yml b/docker-compose.yml index f7935aa1b..85a5dab2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,6 +47,7 @@ services: # Email Notifications (https://nodemailer.com/smtp/) # - SMTP_HOST= # - SMTP_PORT=587 + # - SMTP_NAME= # - SMTP_SECURE=true # - SMTP_USER= # - SMTP_PASSWORD= diff --git a/server/api/hooks/smtp/index.js b/server/api/hooks/smtp/index.js index d6ce84f76..dd9ca8df0 100644 --- a/server/api/hooks/smtp/index.js +++ b/server/api/hooks/smtp/index.js @@ -27,6 +27,7 @@ module.exports = function defineSmtpHook(sails) { pool: true, host: sails.config.custom.smtpHost, port: sails.config.custom.smtpPort, + name: sails.config.custom.smtpName, secure: sails.config.custom.smtpSecure, auth: sails.config.custom.smtpUser && { user: sails.config.custom.smtpUser, diff --git a/server/config/custom.js b/server/config/custom.js index ac344d056..9b5484b11 100644 --- a/server/config/custom.js +++ b/server/config/custom.js @@ -54,6 +54,7 @@ module.exports.custom = { smtpHost: process.env.SMTP_HOST, smtpPort: process.env.SMTP_PORT || 587, + smtpName: process.env.SMTP_NAME, smtpSecure: process.env.SMTP_SECURE === 'true', smtpUser: process.env.SMTP_USER, smtpPassword: process.env.SMTP_PASSWORD,