v0.30.0
1 November 2026
Email images can be embedded, and the mail addon ships newsletter and receipt templates.
Added
Mailer::embed($path)sends a file inside the message and returns itscid:URL. Anhttp(s)://URL is returned as is. Print it with|nocheck:src="{$mail->embed($path)|nocheck}".Mailer::attach($path, $name)attaches a file.Mailer::html()passes the mailer to the template as$mail.Phlat\Mail\Templatein thephlat/mailaddon, withmessage(),newsletter()andreceipt(). Override the views atsite/views/@mail/.variantPath($options)on image and SVG files returns the variant's file on disk, generated first if needed.bg=image option fills transparent areas with a color.- A
legalblock in the mail layout, for the footer line.
Changed
Mailer::message()is gone. UsePhlat\Mail\Template::message($mail, $title, $body, $url, $label).- The mail layout wraps its content in a table with the background color, so clients that ignore
<body>styles still show it.
Fixed
- SVG variants lose their transparency when rasterized.