Loading
Update CDLI Email Template
Summary
This PR introduces a branded HTML email layout for CDLI transactional emails and updates all user-facing mail templates to use it.
Changes Made
Layout
- Rebuilt
templates/layout/email/html/default.phpwith:- Centered CDLI logo header
- Left-aligned body content
- Branded footer with support contact information
- Email-safe, table-based HTML structure with inline CSS
- Kept
templates/Admin/layout/email/html/default.phpin sync with the updated layout.
Email Templates
Updated existing HTML templates:
templates/email/html/welcome.phptemplates/email/html/resetpassword.php
Added new HTML templates:
templates/email/html/admin_new_user.phptemplates/email/html/admin_crowdsourcing_privilege.phptemplates/email/html/contribution_declined.php
Mailer & Logo Handling
- Added
src/Mailer/BrandedEmailTrait.phpto embed the CDLI logo as an inline CID attachment (cid:cdli-logo). - Updated
src/Mailer/UserMailer.phpto:- Attach the inline logo in
deliver()before sending emails. - Switch
adminNewUser(),adminCrowdsourcingPrivilege(), andcontributionDeclined()toEmail::MESSAGE_BOTHso both HTML and plain-text versions are sent.
- Attach the inline logo in
Asset
- Added `app/cake/webroot/images/cdlilogo-email.png` (PNG generated from `cdlilogo.svg` for email client compatibility)

