From e905236f411eabce2b94feeced31256364e333e9 Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Sun, 25 Oct 2026 16:38:42 -0400 Subject: [PATCH] Email: accept SMTP_FROM as "Name
" The whole string was used as the address, so the mail server saw "Quorla support"@domain and rejected the sender. Co-Authored-By: Claude Opus 5.5 --- dashboard/server/notify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard/server/notify.js b/dashboard/server/notify.js index 11658e6..0b30618 100644 --- a/dashboard/server/notify.js +++ b/dashboard/server/notify.js @@ -27,7 +27,8 @@ function mailer() { }); return transport; } -const fromAddress = () => process.env.SMTP_FROM || process.env.SMTP_USER || ""; +// SMTP_FROM may be "support@x.com" or "Quorla "; nodemailer needs the bare address here. +const fromAddress = () => { const f = process.env.SMTP_FROM || process.env.SMTP_USER || ""; return (f.match(/<([^>]+)>/)?.[1] || f).trim(); }; export const appUrl = (p = "") => `${(process.env.PUBLIC_URL || (process.env.APP_DOMAIN ? `https://${process.env.APP_DOMAIN}` : "http://localhost:4310")).replace(/\/+$/, "")}${p}`; const esc = (s) => String(s ?? "").replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[c]);