From f0a878c43227bdd7cf1ba5da6424d4e5c888b0bb Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Thu, 13 Aug 2026 14:15:37 +0200 Subject: [PATCH] fix(mail): show "PawFeed Team" as sender name instead of "team" (Gitea #20) MAIL_FROM is a bare address with no display name, so mail clients fell back to showing the local-part as the sender. Wrap it in a proper display name in code instead of depending on env var formatting. --- src/lib/mail.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/mail.ts b/src/lib/mail.ts index 03deddd..48b8999 100644 --- a/src/lib/mail.ts +++ b/src/lib/mail.ts @@ -43,6 +43,10 @@ interface SendMailInput { } export async function sendMail({ to, subject, text, html }: SendMailInput): Promise { - const from = process.env.MAIL_FROM ?? process.env.SMTP_USER; + const fromAddress = process.env.MAIL_FROM ?? process.env.SMTP_USER; + // Wrap in a display name — a bare address (e.g. "team@pawfeed.org") makes + // most mail clients fall back to showing the local-part ("team") as the + // sender name instead of something recognizable (Gitea #20). + const from = `"PawFeed Team" <${fromAddress}>`; await getTransporter().sendMail({ from, to, subject, text, html }); }