zbateson/mail-mime-parser
PSR-compliant, testable MIME email parser for PHP (RFC 822/2822/5322). A standards-based but forgiving alternative to imap* and Pear for reading and inspecting messages, headers, parts, and attachments. Requires PHP 8.1+.
imap_* functions or PEAR’s Mail_mimeDecode), reducing technical debt and improving maintainability.From/To headers to a CRM).Adopt When:
Content-Type).mmp-crypt-smime/mmp-crypt-gpg) for encrypted/signed emails.Look Elsewhere If:
email for Python) may be more idiomatic."This package replaces error-prone, outdated email parsing with a maintained, RFC-compliant PHP library that extracts structured data from emails—headers, attachments, and encrypted content—without reinventing the wheel. It integrates seamlessly with Laravel, reduces security risks (via S/MIME/PGP support), and enables automation for customer support, compliance, or multi-channel workflows. By adopting this, we avoid technical debt from custom parsing logic and align with modern PHP standards (PSR-compliant, PHP 8.1+)."
ROI:
*"This is a drop-in replacement for PHP’s imap_* functions or PEAR’s Mail_mimeDecode, offering:
ErrorBag and LoggerInterface.Trade-offs:
mmp-crypt-*) add minor dependencies for encryption.Recommendation: Use for inbound email processing (e.g., parsing user uploads, support tickets, or secure communications). Pair with Laravel’s queue system for async handling of large emails."*
How can I help you explore Laravel packages today?