Add the logo and the web wordmark colors to e-mails
CI / Deploy / PHP 8.5 (push) Successful in 1m6s
CI / Deploy / PHP 8.4 (push) Successful in 1m10s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

The HTML layout now shows the logo (inline CID attachment, generated with
the favicon script) before "Plenar" in the text color and "IO" in the primary
color, like the site header. Muted gray and background match the web tokens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-16 15:08:13 +01:00
1 parent 8262411225
commit 72b688186f
9 files changed
+96 -11

No files matched your search

+22
View File
@@ -13,6 +13,28 @@ use Throwable;
*/
class PollMailer extends Mailer
{
/**
* Content-ID of the logo that layout/email/html/default.php references as `cid:plenario-logo`.
*/
public const LOGO_CID = 'plenario-logo';
/**
* @param array<string, mixed>|string|null $profile Mailer profile, see parent
*/
public function __construct(array|string|null $profile = null)
{
parent::__construct($profile);
// Inline attachment: shown without "load images" prompts and independent of a public base URL.
$this->addAttachments([
'logo.png' => [
'file' => RESOURCES . 'mail' . DS . 'logo.png',
'mimetype' => 'image/png',
'contentId' => static::LOGO_CID,
'contentDisposition' => false,
],
]);
}
/**
* Sends a mail like send(), but logs transport errors instead of throwing them,
* so the user gets a friendly hint and the action itself still succeeds.