From 4f4fb8a886ec04f282b585089773a323d56699de Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Wed, 18 Feb 2026 20:19:19 -0600 Subject: [PATCH] chore: update email FROM address and fix unsubscribe link (refs #221) Change default FROM to hello@notify.motovaultpro.com across app and CI senders. Replace broken {{unsubscribeUrl}} placeholder with real Settings page URL. Add RFC 8058 List-Unsubscribe headers for email client support. Co-Authored-By: Claude Opus 4.6 --- backend/src/features/notifications/README.md | 2 +- .../notifications/domain/email-layout/base-layout.ts | 2 +- backend/src/features/notifications/domain/email.service.ts | 6 +++++- scripts/ci/notify.sh | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/src/features/notifications/README.md b/backend/src/features/notifications/README.md index a99960c..77014cc 100644 --- a/backend/src/features/notifications/README.md +++ b/backend/src/features/notifications/README.md @@ -97,7 +97,7 @@ Templates use `{{variableName}}` syntax for variable substitution. ### Environment Variables - `RESEND_API_KEY` - Resend API key (required, stored in secrets) -- `FROM_EMAIL` - Sender email address (default: noreply@motovaultpro.com) +- `FROM_EMAIL` - Sender email address (default: hello@notify.motovaultpro.com) ### Email Delivery - Uses Resend API for transactional emails diff --git a/backend/src/features/notifications/domain/email-layout/base-layout.ts b/backend/src/features/notifications/domain/email-layout/base-layout.ts index d09344a..befe414 100644 --- a/backend/src/features/notifications/domain/email-layout/base-layout.ts +++ b/backend/src/features/notifications/domain/email-layout/base-layout.ts @@ -65,7 +65,7 @@ export function renderEmailLayout(content: string): string { Login to MotoVaultPro

- Manage Email Preferences + Manage Email Preferences

© {new Date().getFullYear()} MotoVaultPro. All rights reserved. diff --git a/backend/src/features/notifications/domain/email.service.ts b/backend/src/features/notifications/domain/email.service.ts index 8a3a31e..baa1c15 100644 --- a/backend/src/features/notifications/domain/email.service.ts +++ b/backend/src/features/notifications/domain/email.service.ts @@ -16,7 +16,7 @@ export class EmailService { } this.resend = new Resend(apiKey); - this.fromEmail = process.env['FROM_EMAIL'] || 'info@notify.motovaultpro.com'; + this.fromEmail = process.env['FROM_EMAIL'] || 'hello@notify.motovaultpro.com'; } /** @@ -33,6 +33,10 @@ export class EmailService { to, subject, html, + headers: { + 'List-Unsubscribe': '', + 'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click', + }, }); } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; diff --git a/scripts/ci/notify.sh b/scripts/ci/notify.sh index 776200c..db69236 100755 --- a/scripts/ci/notify.sh +++ b/scripts/ci/notify.sh @@ -174,7 +174,7 @@ echo " Subject: $SUBJECT" # Build JSON payload JSON_PAYLOAD=$(cat <", + "from": "MotoVaultPro ", "to": ["$NOTIFY_EMAIL"], "subject": "$SUBJECT", "html": $(echo "$HTML_BODY" | jq -Rs .)