Add the logo and the web wordmark colors to e-mails
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:
1 parent
8262411225
commit
72b688186f
9 files changed
+96
-11
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user