messaged/php-mime-mail-parser
Parse MIME emails in PHP with ease. Extract headers, plain and HTML bodies, inline content, and attachments from raw messages through a simple API. Handles nested multipart messages, common transfer encodings, and file saving. Useful for inbox processing, archiving, and email import tools.
cid: images. A wrapper like this is a "buy" decision that saves weeks — the PM trade-off is dependency risk instead of engineering time.mailparse PECL extension, not pure PHP. That single fact drives hosting decisions (custom Docker images, build steps in CI, no-go on restrictive serverless or managed PaaS runtimes) and should be raised in architecture reviews, not discovered during launch.Consider it only in a narrow band:
mailparse extension where a swap has non-trivial regression cost.winmail.dat, no aggressive charset recovery..eml files this afternoon and will throw the code away.Look elsewhere when any of the following is true:
php-mime-mail-parser/php-mime-mail-parser, or a pure-PHP parser such as zbateson/mail-mime-parser.pecl install mailparse.Practical guidance: treat this specific package as not production-grade for new work. The upstream project it descends from is a reasonable choice; this fork is not, absent a specific reason.
To executives: We need to parse inbound email to ship [reply-by-email / ticket ingestion / attachment processing]. The library we found is a thin wrapper over a PHP extension, but it's a stale fork — 62 stars, no downstream dependents, targeting PHP 5.3-era runtimes. The upside is that it's small and cheap to replace; the risk is that it will never get a security or PHP-compatibility fix. Recommendation: fund the feature, not this dependency — budget roughly a day to evaluate the two maintained alternatives and pick one.
To engineering: Two facts drive the call. First, it requires the mailparse PECL extension, so it's a deployment decision as much as a code decision — image builds, CI, and any serverless path. Second, the maintenance signal is poor; we'd be adopting an unmaintained fork of a maintained project. My ask: spike against zbateson/mail-mime-parser (pure PHP, no extension) and the canonical php-mime-mail-parser in parallel, run both over a corpus of real inbound mail including malformed messages, and pick on parse fidelity plus ops cost. Isolate whichever we choose behind a single EmailParser interface so this decision stays reversible.
Framing that lands with both: the parser is a replaceable component behind one interface — so the real decision is "do we accept a native-extension dependency and an unmaintained fork," and the answer should be no unless a legacy constraint forces it.
How can I help you explore Laravel packages today?