Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mail Laravel Package

nette/mail

Lightweight PHP mailer from the Nette framework: compose and send emails with SMTP support, MIME messages, attachments, HTML/text bodies, and headers. Sensible defaults, easy integration, and good testability for apps and services.

View on GitHub
Deep Wiki
Context7
v4.1.2
  • Interceptor – a new mailer wrapper that redirects all outgoing 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.
  • MailTracy Bar panel – a new 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.
v4.1.1

🐛 Bug Fixes

  • Message::setHtmlBody() – survives large inline 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)
  • Message::setHtmlBody() – embeds images whose quoted src="…" or url('…') contains spaces, like "holiday photos/beach.jpg" (#97)
  • Message::setHtmlBody() – embeds images whose quoted path contains parentheses, so the classic screenshot (1).png naming no longer silently breaks (#89)
  • SendmailMailer – signs the full message so DKIM now covers Subject and To headers, closing a deliverability gap at Gmail, Outlook, and other strict providers (#99)
  • MimePart – quotes address phrases containing special characters before MIME-encoding, producing spec-compliant headers even when names include commas, angle brackets, or quotes (#102)
  • CssInliner – gracefully skips selectors the DOM engine can't evaluate; pseudo-classes and pseudo-elements like ::marker, :hover, :checked no longer break inlining
  • CssInliner – tokenizer regex fixed for very long strings and invalid url() quote combinations that previously tripped the parser
v4.1.0

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](https://github.com/media) queries keep working.

v4.0.4
  • support for PHP 8.5
  • optimized global function calls
  • used attribute Deprecated
v4.0.3
  • SendmailMailer: the use of -f option in the mail command can be disabled (#98)
  • support for PHP 8.4
v4.0.2
  • SmtpMailer: fixed problem with empty response with slow SMTP server
v3.1.11
  • support for PHP 8.3
  • SmtpMailer: fixed problem with empty response with slow SMTP server
v4.0.1
  • support for PHP 8.3
  • SendmailMailer: fixed $commandArgs handling after 0e236e4 #93
  • SmtpMailer: adds 'To: undisclosed-recipients' header when a mail is with only Bcc recipients (#92)
  • used #[\SensitiveParameter] to mark sensitive parameters
v3.1.10
  • MailExtension: renamed option 'secure' -> 'encryption'
  • composer: allows nette/utils 4.0
v4.0.0
  • requires PHP 8.0
  • SmtpMailer & DkimSigner constructor: $options changed to parameters (BC break)
  • SendmailMailer: uses CRLF for message
  • SendmailMailer: 'From' is passed as cmd argument [Closes #78]
  • constants are PascalCase
  • deprecated magic properties (BC break)
v3.1.9
  • support for PHP 8.2
  • private constants are PascalCase
  • cs
v3.1.8
  • support for PHP 8.1
  • Message::getPriority return type fix (#87)
v3.1.7
  • Message::buildText(): Trim each text line. (#84)
  • SendmailMailer: use CRLF endings for php >= 8.0 (#83)
  • typo #85
v3.1.6
  • Message: preserves custom Message-ID (#82)
  • SmtpMailer: From can be null. (#77)
  • strict fix
v3.1.5
  • compatible with PHP 8.0
  • MimePart::encodeSequence uses mime_encode for long strings
  • MimePart: UTF8 in attachment filename is encoded #75
  • MimePart: encodeHeader() -> encodeSequence()
  • Message::createAttachment() when content is provided, file name is not changed
  • Message::createAttachment() escapes " in filename
  • SmtpMailer: allowed login with blank password #74

For the details you can have a look at the diff.

v3.1.4
  • SmtpMailer: Fix for servers which sends 250-AUTH only through encrypted connections (#67)
  • DkimSigner: removed testmode, added getTime()
  • Revert "SmtpMailer: Fix for servers which sends 250-AUTH only through encrypted connections (#67)" #71
  • Revert "MimePart: line length limit changed to 500" #72

For the details you can have a look at the diff.

v3.1.3
  • SmtpMailer: Fix for servers which sends 250-AUTH only through encrypted connections (#67)
  • use FileSystem::read() instead of native file_get_contents() (#69)
  • Message: Optional parameter before required (#68)

For the details you can have a look at the diff.

v3.1.2
  • MimePart: fixed folding of header with file name #24
  • MimePart: line length limit changed to 500
  • MailExtension: privateKey is not dynamic

For the details you can have a look at the diff.

v3.1.1
  • class aliases are loaded on demand
  • uses nette/utils 3.1

For the details you can have a look at the diff.

v3.1.0
  • added DKIM feature (#51)
  • renamed Nette\Mail\IMailer -> Mailer

DKIM can be configured via config file:

mail:
	dkim:
		domain: ...
		selector: ...
		privateKey: private.key.file
		passPhrase: ...
		testMode: ...
v3.0.1
  • added .phpstorm.meta.php
  • Message: added support for quoted "display-name" <email> #64
  • MailExtension: added getConfigSchema()

For the details you can have a look at the diff.

v3.0.0
  • requires PHP 7.1
  • uses declare(strict_types=1)
  • uses PHP 7.1 scalar and return type hints
  • SmtpMailer: supports TLS v1.2
v2.4.6
  • MailExtension: Persistent parameter is configurable (#55)
  • Embedding SVG Images in Apple Mail (#53)
  • Mail: check if the function mail() exists #52

For the details you can have a look at the diff.

v2.4.5
  • SmtpMailer: $error may not be filled

For the details you can have a look at the diff.

v2.4.4
  • Message: fixed wrong content type for .eml files added as attachment #47
  • SmtpMailer: allow setting the client name through config (#46)
  • SmtpSender: Better handling of exceptions thrown when building the message (#43)
  • travis: added PHP 7.2

For the details you can have a look at the diff.

v2.4.3
  • supports PHP up to 7.2
  • coding style: fixes, lowercase true/false/null

For the details you can have a look at the diff.

v2.4.2
  • fixed phpDoc
  • fixed strict compatibility
  • @return self -> static

For the details you can have a look at the diff.

v2.4.1
  • SmtpMailer: add support for AUTH PLAIN (#31)

For the details you can have a look at the diff.

v2.4.0
  • requires PHP 5.6
  • Message::setHtmlBody() added new syntax for embedded files [[image.gif]] #29
  • added FallbackMailer #28
  • Message: added addInlinePart() #27
  • SmtpMailer: allow set stream context (#30)
  • uses Nette\SmartObject

For the details you can have a look at the diff.

v2.3.5
  • Message: improved regexp for seaching embedded images #25

For the details you can have a look at the diff.

v2.2.5
  • SmtpMailer: improved exception message on write failure

For the details you can have a look at the diff.

v2.3.4
  • SmtpMailer: used stream_socket_client instead of fsockopen #19
  • Messages: fixed regexp for propagating links #18

For the details you can have a look at the diff.

v2.3.3
  • Message: propagates links target from HTML message to plaintext version

For the details you can have a look at the diff.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope