Fix email links broken in Outlook and standardize all email URLs
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m33s
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m33s
- Rewrite ctaButton to use td-background pattern (works in all clients including Outlook, Gmail, Yahoo, Apple Mail) instead of VML/conditional comments that broke link clicking in Outlook desktop - Add plaintext fallback URL below every CTA button so users always have a working link even if the button fails - Add getBaseUrl() and ensureAbsoluteUrl() helpers in email.ts to guarantee all email links are absolute https:// URLs - Apply ensureAbsoluteUrl safety net in sendStyledNotificationEmail and sendNotificationEmail so relative paths can never reach email templates - Standardize all NEXTAUTH_URL fallbacks to https://portal.monaco-opc.com (was inconsistently http://localhost:3000 or https://monaco-opc.com) - Fix legacy notification.ts: wrong argument order in sendJuryInvitationEmail (URL was passed as name parameter) - Fix legacy notification.ts: missing NEXTAUTH_URL fallback for evaluation reminder URL construction - Change tooltip styling from red bg to white bg with black text Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -128,22 +128,24 @@ async function sendEmailNotification(
|
||||
case 'JURY_INVITATION':
|
||||
await sendJuryInvitationEmail(
|
||||
email,
|
||||
name,
|
||||
data.inviteUrl,
|
||||
data.programName,
|
||||
data.roundName
|
||||
)
|
||||
return { success: true }
|
||||
|
||||
case 'EVALUATION_REMINDER':
|
||||
case 'EVALUATION_REMINDER': {
|
||||
const baseUrl = process.env.NEXTAUTH_URL || 'https://portal.monaco-opc.com'
|
||||
await sendEvaluationReminderEmail(
|
||||
email,
|
||||
name,
|
||||
parseInt(data.pendingCount || '0'),
|
||||
data.roundName || 'Current Round',
|
||||
data.deadline || 'Soon',
|
||||
data.assignmentsUrl || `${process.env.NEXTAUTH_URL}/jury/assignments`
|
||||
data.assignmentsUrl || `${baseUrl}/jury/assignments`
|
||||
)
|
||||
return { success: true }
|
||||
}
|
||||
|
||||
case 'ANNOUNCEMENT':
|
||||
await sendAnnouncementEmail(
|
||||
|
||||
Reference in New Issue
Block a user