Version 2.0 modernizes the package and closes the longest-standing feature requests. See UPGRADE.md for the full 1.x → 2.0 migration guide.
Added
- Certificate-based client authentication via
client_certificate(JWT client assertion, PEM content or file paths, optional passphrase) — no more expiring client secrets - Automatic large-attachment handling: mails above the ~4 MB Graph
sendMaillimit are sent through draft messages and chunked attachment upload sessions (requires theMail.ReadWriteapplication permission); closes #41, supersedes #42 — thanks @willem-v-dam - Per-mailable
saveToSentItemsoverride via SymfonyMetadataHeader('save-to-sent-items', …); supersedes #50 — thanks @yparitcher - Mailer-level
fromis now optional and falls back to the globalmail.from; supersedes #35 and #44 — thanks @spawnia - Laravel Boost skill (
msgraph-mail) with configuration guidance, troubleshooting, and an Azure app registration walkthrough
Changed
- Requires PHP >= 8.2 and Laravel 11, 12, or 13
- Access tokens are cached for their actual
expires_inlifetime (minus a safety buffer) and per tenant and client; the undocumentedaccess_token_ttloption was removed - Attachment names use the real filename including its extension where the framework exposes one (inline images now render in clients like Thunderbird); closes #69 — thanks @apreiml — and the #58/#52 lineage
save_to_sent_itemsis read from the mailer's own config entry, fixing silently-disabled saving on mailers registered under custom keys- With
save_to_sent_itemsdisabled, large (draft-based) sends permanently delete the sent copy; failed draft sends clean up their orphaned draft - Symfony metadata/tag headers are no longer forwarded to recipients as literal mail headers
- PHPStan baseline emptied; all previously suppressed issues fixed with real types
Maintenance
The 1.x branch remains open for security and compatibility fixes.