From 06e4fa18fd4be92005839ad704f6dec89c452b1d Mon Sep 17 00:00:00 2001 From: soruly Date: Mon, 25 Nov 2024 03:18:27 +0000 Subject: [PATCH] Add email from --- .env.example | 1 + src/lib/create-new-user.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 957920c..9a1ddc9 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,7 @@ SOLA_SOLR_SIZE=1 # EMAIL_SMTP_PORT=587 # EMAIL_USER= # EMAIL_PASS= +# EMAIL_FROM # Sponsor setting, leave empty to disable # WEBHOOK_GITHUB_SECRET= diff --git a/src/lib/create-new-user.js b/src/lib/create-new-user.js index 90457c4..f99601b 100644 --- a/src/lib/create-new-user.js +++ b/src/lib/create-new-user.js @@ -6,7 +6,7 @@ import nodemailer from "nodemailer"; import generateAPIKey from "./generate-api-key.js"; const { SOLA_DB_NAME, TRACE_API_SALT, EMAIL_SMTP, EMAIL_SMTP_PORT } = process.env; -let { EMAIL_USER, EMAIL_PASS } = process.env; +let { EMAIL_USER, EMAIL_PASS, EMAIL_FROM } = process.env; const __filename = new URL("", import.meta.url).pathname; const __dirname = new URL(".", import.meta.url).pathname; @@ -64,7 +64,7 @@ export default async (knex, email, tier, full_name = "") => { }); const info = await transporter.sendMail({ - from: `"trace.moe" <${EMAIL_USER}>`, + from: `"trace.moe" <${EMAIL_FROM}>`, to: email, bcc: EMAIL_USER, subject: "Thank you for supporting trace.moe",