chore: Update email FROM address and fix unsubscribe link #222

Merged
egullickson merged 3 commits from issue-221-update-email-from-and-unsubscribe into main 2026-02-19 02:54:28 +00:00
4 changed files with 8 additions and 4 deletions
Showing only changes of commit 4f4fb8a886 - Show all commits

View File

@@ -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

View File

@@ -65,7 +65,7 @@ export function renderEmailLayout(content: string): string {
<a href="https://motovaultpro.com" style="${EMAIL_STYLES.footerLink}" target="_blank">Login to MotoVaultPro</a>
</p>
<p style="${EMAIL_STYLES.footerText}">
<a href="{{unsubscribeUrl}}" style="${EMAIL_STYLES.footerLink}" target="_blank">Manage Email Preferences</a>
<a href="https://motovaultpro.com/settings" style="${EMAIL_STYLES.footerLink}" target="_blank">Manage Email Preferences</a>
</p>
<p style="${EMAIL_STYLES.copyright}">
&copy; {new Date().getFullYear()} MotoVaultPro. All rights reserved.

View File

@@ -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': '<https://motovaultpro.com/settings>',
'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click',
},
});
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'Unknown error';

View File

@@ -174,7 +174,7 @@ echo " Subject: $SUBJECT"
# Build JSON payload
JSON_PAYLOAD=$(cat <<EOF
{
"from": "MotoVaultPro <deploy@notify.motovaultpro.com>",
"from": "MotoVaultPro <hello@notify.motovaultpro.com>",
"to": ["$NOTIFY_EMAIL"],
"subject": "$SUBJECT",
"html": $(echo "$HTML_BODY" | jq -Rs .)