diff --git a/backend/src/services/emailProcessor.js b/backend/src/services/emailProcessor.js index ea4537d0..5e07f517 100644 --- a/backend/src/services/emailProcessor.js +++ b/backend/src/services/emailProcessor.js @@ -162,29 +162,52 @@ function darkenColor(hex, amount = 0.15) { // Wrap HTML body in the styled email template with header, footer, and logo async function wrapEmailHtml(htmlBody, subject, language = 'en') { - // Get branding settings for logo and email colors + // Email colour palette. The two original settings (email_primary_color and + // email_secondary_color) keep their existing semantics so emails sent by + // upgraded instances render byte-for-byte identically until an admin + // touches the new fields. The six new tokens unlock full email theming + // (body bg, container card, list panel, body text, muted text, button text) + // and default to the previously hard-coded literals when absent. let logoUrl = ''; let companyName = 'PicPeak'; let primaryColor = '#5C8762'; let secondaryColor = '#f9f9f9'; + let bodyBgColor = '#f5f5f5'; // outer wrapper + body background + let containerBgColor = '#ffffff'; // email card + let listBgColor = '#f9f9f9'; //