Freedom251 › Email Parsing Software
PHP MIME Mail Parser

What PHP MIME Mail Parser is
PHP MIME Mail Parser is a free PHP library for extracting information from MIME email, wrapping the mailparse extension. It can support workflows such as processing Postfix mail, reading .eml messages, building webmail, and storing email information in a database. Inputs may be file paths, raw MIME text, PHP file resources, or streams such as stdin. The library can return headers as raw text or as a character-set-converted array, and extract addresses and the subject. It retrieves text and HTML bodies, including HTML with embedded content such as images. Attachment functions can list and save files, include or omit inline attachments, and apply a chosen strategy to duplicate filenames. The project recommends installation through Composer using php-mime-mail-parser/php-mime-mail-parser. The current package requires PHP 8.2 or later and the mailparse extension; listed supported PHP versions are 8.2 through 8.5. Setup instructions cover Debian and Ubuntu, macOS, Windows, and other platforms. The library is MIT-licensed and listed as free.
Who it suits
This library suits PHP developers who need to parse MIME messages or extract headers, bodies, and attachments. It requires PHP 8.2 or later and the mailparse extension.
What it does well
- Accepts files, raw MIME text, resources, and streams.
- Extracts text, HTML, headers, and addresses.
- Can list and save attachments.
- MIT-licensed and listed as free.
What to know first
- Requires PHP 8.2 or later.
- Requires the mailparse extension.
- No OCR extraction, webhook delivery, or API access.
Limits
The free library requires PHP 8.2 or later and the mailparse extension. The project lists no OCR extraction, webhook delivery, or API access.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| MIT-licensed open-source library | Not applicable · PHP 8.2+ · requires the mailparse extension | Free |
As github.com lists them, read 7 Oct 2026. The maker's own page has the final word.
Getting started
- Install PHP 8.2 or later.
- Install and enable the mailparse extension using the setup instructions for your platform.
- Install the package through Composer as php-mime-mail-parser/php-mime-mail-parser.
- Load a message from a file path, raw MIME text, PHP file resource, or stream such as stdin.
- For Postfix workflows, use the documented configuration to forward mail to a PHP script.
Overview
PHP MIME Mail Parser is a free, MIT-licensed library for developers processing email in PHP applications. It is a strong fit when you want to work directly with MIME messages inside your own mail workflow, but less so if you need a hosted parsing service or managed delivery.
Its practical advantage is a focused set of tools for inspecting messages and handling attachments without a license fee. The cost is operational: your environment must support PHP 8.2 or later and the mailparse extension.
Key features
Messages can come from a file path, raw MIME text, a PHP file resource, or a stream such as stdin. This range suits both saved-message processing and server-side intake; the documented Postfix configuration forwards mail to a PHP script through a stream. The project also identifies reading .eml files, building webmail, and storing email information in a database as intended workflows.
For inspection, the parser can return headers as raw text or as an array with character-set conversion, and extract addresses and subject. It retrieves text and HTML bodies, including HTML with embedded content such as images. It can list and save attachments, include or exclude inline attachments, and apply a chosen strategy to duplicate filenames. That is useful when an application needs control over embedded content and filename collisions, though the library does not offer OCR extraction, webhook delivery, or API access.
It handles Internet Message Format RFC 822, RFC 2822, and RFC 5322. Installation is through Composer using php-mime-mail-parser/php-mime-mail-parser. The project says it uses GitHub Actions, Codecov, and Codacy to support code quality, and reproduces, fixes, and tests known issues. For issue reports, it asks users to provide the raw email that triggered the problem, which may require care when messages contain sensitive information.
Pricing
The MIT-licensed open-source library costs nothing, with billing not applicable. There is no paid tier or free-trial period to weigh. The free plan includes the parser subject to PHP 8.2+ and the mailparse extension, so the main expense is the work of maintaining a compatible environment and integrating it into your application.
Platforms
It supports Linux, macOS, and Windows, as well as self-hosted deployment. The README provides mailparse setup instructions for Debian and Ubuntu, macOS, Windows, and other platforms. That breadth is useful for teams with varied hosting environments, but each deployment still needs the PHP runtime and extension configured.
Who it's for
Choose it if you are building a PHP mail workflow and want direct access to headers, bodies, and attachments from files, raw messages, or streams. It is especially relevant for Postfix-to-PHP intake or applications that process .eml messages. Look elsewhere if you need a hosted API, webhook delivery, OCR, or a service that removes runtime and extension setup from your responsibilities.
Pros and cons
- Pros: Free under the MIT license, with no paid-plan threshold to reach for the core parser.
- Pros: Multiple input types and controls for inline attachments and duplicate filenames make it adaptable to different PHP mail workflows.
- Pros: Support for four listed PHP versions—8.2, 8.3, 8.4, and 8.5—gives teams a defined compatibility range.
- Cons: PHP 8.2 or later and mailparse are prerequisites, adding setup and maintenance compared with a hosted service.
- Cons: No OCR, webhook delivery, or API access, so it does not cover workflows that depend on those capabilities.
Alternatives
Email Parsing Software is the broader category directory for comparing options.
- CloudMailin is worth considering if you prefer an API or web service with a free tier capped at 10,000 emails per month and 512KB per message, or a Starter plan at $25 a month with 10,000 emails per month and 2MB per message.
- DigiParser may suit document-focused processing, with a paid plan starting at $14 a month for 100 payslips and enterprise pricing for 1,000 or more documents per month.
- MailFrame offers a web or API route with webhook delivery; its free tier allows 100 parse operations per month and one active schema.
- MailParse is another web or API option, with a free plan for 100 emails per month that includes webhook delivery, REST polling, and one inbound address.
- noima is an alternative with a free allowance of 10 documents once and 30 days of retention, or a Starter plan at €12 a month for 150 documents per month and 60 days of retention.
- Parserr may fit inbox-oriented workflows, with a free plan covering 15 emails and 10 documents per month, one inbox, and unlimited parsing rules and integrations.
- Parseur offers a web or API option with a free plan of up to 20 pages per month, one user, and 90-day retention.
- Parsio Receipt OCR is an alternative for receipt OCR workflows.
Verdict
PHP MIME Mail Parser is the right choice for developers who want a no-license-cost way to parse MIME email within a PHP application and can manage PHP and mailparse themselves. Its direct message and attachment handling is the reason to choose it; the runtime dependency and absence of hosted API, webhook, and OCR features are the reasons to look elsewhere.
Verdict
PHP MIME Mail Parser covers message headers, bodies, and attachments across several input types. Its PHP and mailparse requirements should be checked before adopting it.
Questions
How much does PHP MIME Mail Parser cost?
The MIT-licensed open-source library is listed as free.
What does the library parse?
It can retrieve headers, addresses, subject, text and HTML bodies, and attachments from MIME messages. It can also handle HTML with embedded content such as images.
What are the installation requirements?
The current package requires PHP 8.2 or later and the mailparse extension. The README lists PHP 8.2, 8.3, 8.4, and 8.5 as supported.
How do I install it?
The README recommends Composer with the package name php-mime-mail-parser/php-mime-mail-parser.
Which platforms are listed?
Linux, macOS, self-hosted, and Windows are listed. The README provides mailparse setup instructions for Debian and Ubuntu, macOS, Windows, and other platforms.
What license does it use?
The library is released under the MIT license.
Facts from PHP MIME Mail Parser's own pages
- Attachments
- It can list and save attachments, include or exclude inline attachments, and choose duplicate filename handling strategies. · github.com, 7 Oct 2026
- Email workflows
- The project says it can parse mail from Postfix, read .eml messages, create webmail, and store email information in a database. · github.com, 7 Oct 2026
- Headers
- The parser can return message headers as raw text or as an array with character set conversion, and can extract addresses and subject. · github.com, 7 Oct 2026
- Installation
- The README recommends installation through Composer using the package name php-mime-mail-parser/php-mime-mail-parser. · github.com, 7 Oct 2026
- Integration
- The README documents a Postfix configuration that forwards mail to a PHP script using a stream input. · github.com, 7 Oct 2026
- License
- The library is released under the MIT license. · github.com, 7 Oct 2026
- Message bodies
- It can retrieve text, HTML, and HTML with embedded content such as images. · github.com, 7 Oct 2026
- Message inputs
- Messages can be loaded from a file path, raw MIME text, a PHP file resource, or a stream such as stdin. · github.com, 7 Oct 2026
- Platform setup
- The README provides mailparse installation instructions for Debian and Ubuntu, macOS, Windows, and other platforms. · github.com, 7 Oct 2026
- Purpose
- PHP MIME Mail Parser is a PHP email parser that wraps the mailparse extension. · github.com, 7 Oct 2026
- Quality assurance
- The project says it uses GitHub Actions, Codecov, and Codacy to help ensure code quality and that known issues are reproduced, fixed, and tested. · github.com, 7 Oct 2026
- Requirements
- The current package requires PHP 8.2 or later and the mailparse extension. · packagist.org, 7 Oct 2026
- Standards
- The README says the parser handles Internet Message Format RFC 822, RFC 2822, and RFC 5322. · github.com, 7 Oct 2026
- Support
- For issue reports, the README asks users to provide the raw email that triggered the problem to help reproduce it. · github.com, 7 Oct 2026
- Supported PHP versions
- The README lists PHP 8.2, 8.3, 8.4, and 8.5 as supported versions. · github.com, 7 Oct 2026
Where PHP MIME Mail Parser stands on Freedom251
- Email Parsing Software#6 of 22