NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
Packagist
Packagist, #1998 most downloaded on Packagist
π§ Nette Mail: composes and sends emails. HTML with images embedded automatically, attachments, Latte templates, SMTP with OAuth 2.0 and DKIM signing.
Latest stable
v4.2.3
Last release 16 days ago
06 Nov 2026
Release timing varies
gaps range from 9 days to 11 months
Nearly every release is documented
notes for 44 of 45 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
45 releases Β· first in 2014
Drag across the ruler to compare, or tap a release to open it.
`file` configuration key β point it to a directory and every email is saved there as an .eml file instead of being sent, with DKIM signing, redirect a
file configuration key β point it to a directory and every email is saved there as an .eml file instead of being sent, with DKIM signing, redirect and the Tracy panel working just as with a real transportaccessToken configuration key β XOAUTH2 straight from the config; pass a callable such as @App\GoogleOAuth::getAccessToken(...) and an expiring token is fetched fresh for every connectiondisplay: -webkit-box; display: flex survives inlining, within one rule and across rules, so an older email client still finds a value it understandsSender or From) instead of the web server's host or the machine nameInvalidArgumentException for an unknown encryption (BC break) β a value such as 'TLS', 'starttls' or an empty string used to mean an unencrypted connection; use 'ssl', 'tls' or null. This also catches a dynamic %env% value the configuration schema cannot checktimeout: 0 leaves the limits to PHP's default_socket_timeout, and a rejected EHLO is reported as such, staying retryable in FallbackMailer when the rejection is temporaryYour coding agent can read these notes before it upgrades. Set up the MCP server β
The [[...]] placeholder in HTML bodies now embeds only an image inside the base path given to embedImages(); any other [[...]] in the text, such as [[
[[...]] placeholder in HTML bodies now embeds only an image inside the base path given to embedImages(); any other [[...]] in the text, such as [[spoiler]] or a path leading outside the base directory, stays as plain text (#108)Display names are no longer quoted when they don't need to be (#107). Since 4.2.0 any name outside plain ASCII β so every name with diacritics β got w
quoted-string before MIME encoding, which buried the quotes inside the base64 payload and decoded them as part of the name: ObjednΓ‘vky domena.cz arrived as "ObjednΓ‘vky domena.cz". Quoting is now reserved for characters that could genuinely restructure an address list (, ; : < > @ " \), so Kdo uteΔe, obΔdvΓ‘ keeps its quotes and the DKIM fix from #102 stands, while ordinary accented names go out clean.Nothing published for this version
Interceptor β a new mailer wrapper that redirects all outgoing To/Cc/Bcc (plus read-receipt headers) to one fixed address, preserves the originals in
To/Cc/Bcc (plus read-receipt headers) to one fixed address, preserves the originals in X-Original-* headers, and optionally adds a subject prefix. No more sending test mail to real customers by accident. Wire it via DI with mail.redirect: dev@example.com and it slots in automatically.Bridges/MailTracy/MailPanel subscribes to Interceptor::$onSent and lists each sent message (From / To+Cc+Bcc / Subject / Status) right in the Tracy Bar. Auto-registers in debug mode whenever the Interceptor is active; opt in or out explicitly with mail: debugger: true|false.HtmlComposer β a standalone HTML pre-processing pipeline you can drive directly: opt in to inlineCss() (accumulates stylesheets across calls), embedImages($basePath), and let it handle <title> to subject extraction and plain-text alternative generation. Message::setHtmlBody() keeps working as a BC-friendly facade.Message::setHtmlBody() β survives large inline data: URIs. A >500 kB base64 payload used to exhaust PCRE's backtrack limit and abort the whole send; t
data: URIs. A >500 kB base64 payload used to exhaust PCRE's backtrack limit and abort the whole send; the regex is now backtracking-free (#79)src="β¦" or url('β¦') contains spaces, like "holiday photos/beach.jpg" (#97)screenshot (1).png naming no longer silently breaks (#89)Subject and To headers, closing a deliverability gap at Gmail, Outlook, and other strict providers (#99)::marker, :hover, :checked no longer break inliningurl() quote combinations that previously tripped the parserThis release introduces CssInliner β a brand-new component that brings CSS-to-inline-style conversion directly into Nette Mail. The minimum PHP versio
This release introduces CssInliner β a brand-new component that brings CSS-to-inline-style conversion directly into Nette Mail. The minimum PHP version has been raised to 8.2, and static analysis is now a mandatory part of the build pipeline.
Minimum PHP version raised from 8.0 to 8.2 β time to upgrade if you haven't already
Improved PHPDoc types and descriptions for better IDE support and static analysis accuracy
CssInliner β converts <style> rules into inline style attributes, making your HTML emails render consistently across email clients. Features a single-regex tokenizer, full CSS nesting support, Dom\HTMLDocument selector matching (PHP 8.4+), and automatic Outlook-compatible HTML attribute generation (bgcolor, width, align, etc.). <style> tags are preserved so @media queries keep working.
optimized global function calls
SendmailMailer: the use of -f option in the mail command can be disabled
SmtpMailer: fixed problem with empty response with slow SMTP server
SendmailMailer: fixed $commandArgs handling after 0e236e4 #93
deprecated magic properties (BC break)
SmtpMailer: fixed problem with empty response with slow SMTP server
MailExtension: renamed option 'secure' -> 'encryption'
private constants are PascalCase
Message::getPriority return type fix
Message::buildText(): Trim each text line.
Message::buildText(): Trim each text line. (#84)Message: preserves custom Message-ID
MimePart::encodeSequence uses mime_encode for long strings
encodeHeader() -> encodeSequence()createAttachment() when content is provided, file name is not changedcreateAttachment() escapes " in filenameFor the details you can have a look at the diff.
SmtpMailer: Fix for servers which sends 250-AUTH only through encrypted connections
getTime()For the details you can have a look at the diff.
SmtpMailer: Fix for servers which sends 250-AUTH only through encrypted connections
read() instead of native file_get_contents() (#69)For the details you can have a look at the diff.
MimePart: fixed folding of header with file name #24
For the details you can have a look at the diff.
class aliases are loaded on demand
For the details you can have a look at the diff.
renamed Nette\Mail\IMailer -> Mailer
DKIM can be configured via config file:
mail:
dkim:
domain: ...
selector: ...
privateKey: private.key.file
passPhrase: ...
testMode: ...
Message: added support for quoted "display-name" #64
<email> #64getConfigSchema()For the details you can have a look at the diff.
uses PHP 7.1 scalar and return type hints
MailExtension: Persistent parameter is configurable
mail() exists #52For the details you can have a look at the diff.
SmtpMailer: $error may not be filled
For the details you can have a look at the diff.
Message: fixed wrong content type for .eml files added as attachment #47
For the details you can have a look at the diff.
coding style: fixes, lowercase true/false/null
For the details you can have a look at the diff.
For the details you can have a look at the diff.
For the details you can have a look at the diff.
SmtpMailer: add support for AUTH PLAIN
For the details you can have a look at the diff.
Message::setHtmlBody() added new syntax for embedded files [[image.gif]] #29
setHtmlBody() added new syntax for embedded files [[image.gif]] #29addInlinePart() #27For the details you can have a look at the diff.
Message: improved regexp for seaching embedded images #25
For the details you can have a look at the diff.
SmtpMailer: used stream_socket_client instead of fsockopen #19
For the details you can have a look at the diff.
Message: propagates links target from HTML message to plaintext version
For the details you can have a look at the diff.
added SendException [Closes #13]
For the details you can have a look at the diff.
Message: added getAttachments() [Closes #11]
getAttachments() [Closes #11]For the details you can have a look at the diff.
variable $mail is not automatically passed to templates, you have to do it yourself _(BC break)_ (but better than {var $mail->subject = "Your new orde
$mail is not automatically passed to templates, you have to do it yourself (BC break) (but better than {var $mail->subject = "Your new order"} is this <title>Your new order</title>, isn't it?)setHtmlBody()SmtpMailer: improved exception message on write failure
For the details you can have a look at the diff.
travis: migrating to container-based infrastructure
For the details you can have a look at the diff.
For the details you can have a look at the diff.
For the details you can have a look at the diff.
changed & fixed encoding of emails in headers
For the details you can have a look at the diff.
SendMailMailer: fixed catching of error message
For the details you can have a look at the diff.
The first standalone release. For more information see readme.md.
The first standalone release. For more information see readme.md.
One column per quarter.