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.php with:
    • 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.php in sync with the updated layout.

Email Templates

Updated existing HTML templates:

  • templates/email/html/welcome.php
  • templates/email/html/resetpassword.php

Added new HTML templates:

  • templates/email/html/admin_new_user.php
  • templates/email/html/admin_crowdsourcing_privilege.php
  • templates/email/html/contribution_declined.php

Mailer & Logo Handling

  • Added src/Mailer/BrandedEmailTrait.php to embed the CDLI logo as an inline CID attachment (cid:cdli-logo).
  • Updated src/Mailer/UserMailer.php to:
    • Attach the inline logo in deliver() before sending emails.
    • Switch adminNewUser(), adminCrowdsourcingPrivilege(), and contributionDeclined() to Email::MESSAGE_BOTH so both HTML and plain-text versions are sent.

Asset

  • Added `app/cake/webroot/images/cdlilogo-email.png` (PNG generated from `cdlilogo.svg` for email client compatibility)

Welcome Email

Screenshot from 2026-06-29 12-10-18.png

Password Reset Email

Screenshot_from_2026-06-29_12-01-22.png

Merge request reports

Loading
Loading