Mailparse is a PHP extension for reading email messages and splitting them into their component parts: headers, bodies, MIME sections and attachments. Helpdesk and ticketing systems that accept mail-in tickets, mailing list managers, mailbox importers and some CRM add-ons all ask for it. It is not compiled into PHP by default, so nothing that needs it will work until you switch it on for your account.
This guide shows you how to enable Mailparse on a DirectAdmin account using the CloudLinux PHP Selector, which DirectAdmin surfaces as Select PHP version. It also covers the two things that catch people out with this particular extension: the native PHP version error that blocks the Extensions view, and the mbstring dependency that Mailparse quietly relies on.
Last reviewed: 27 July 2026, against the current DirectAdmin release and its Evolution interface, with the CloudLinux PHP Selector plugin. This guide is written for Noiz hosting and is kept current against DirectAdmin and CloudLinux. It complements, and does not replace, the official documentation linked below.
Official Documentation Reference
- CloudLinux OS: PHP Selector: what the Selector controls and what it deliberately does not.
- CloudLinux OS: PHP Extensions: how extensions are packaged separately for each alternative PHP version.
- CloudLinux OS: PHP Selector client plugin: the end-user interface you see inside the panel.
- PHP Manual: Mailparse and Mailparse installation notes, which document the mbstring requirement.
- PECL: mailparse package: release history and changelog.
- DirectAdmin Documentation: PHP Extensions: how PHP extensions are handled at server level.
Prerequisites
- Login details for the DirectAdmin user account that runs the site needing Mailparse.
- A Select PHP version item in your DirectAdmin menu. If it is absent, the CloudLinux PHP Selector is not available on your package and this procedure does not apply.
- The account set to a selectable (alternative) PHP version rather than the server's native PHP. Step 2 below covers this if you are not sure which you are on.
Enable the Mailparse Extension
Step 1: Open Select PHP version
- Log in to your DirectAdmin account.
- In the Extra Features section, click Select PHP version. If you cannot see the section, type
Select PHPinto the navigation filter box at the top of the menu and click the result that appears.
![]()
Step 2: Open the Extensions view
- Click the Extensions menu.

Note: if the Extensions page returns an error mentioning the native PHP version, the account is running the server's built-in PHP. The Selector cannot manage extensions for native PHP, because that build's extension set is fixed at server level for every account at once. Return to the Current PHP version view, choose a numbered version such as 8.3 instead of native, apply it, then reopen Extensions. The full procedure is in How to Change the PHP Version via CloudLinux Selector in DirectAdmin.
Step 3: Tick Mailparse
- Find mailparse in the extension list.
- Tick its checkbox.
The change saves on the spot. There is no separate Save button, no page reload and no server restart, and a confirmation message appears reading that the module mailparse is saved.

Step 4: Tick mbstring while you are there
Mailparse leans on the mbstring extension for character set handling, and the PHP manual lists mbstring as a requirement for it. It is usually enabled already, but confirm it before you leave this screen. If mbstring is unticked, tick it too.
Skipping this is the single most common reason Mailparse looks enabled and yet the application still behaves oddly, typically mangling encoded subject lines, non-ASCII sender names or multipart message bodies rather than failing outright.
Confirm Mailparse Is Actually Loaded
The checkbox records your preference. It is not proof that the PHP handler serving your website has loaded the extension, so verify it from PHP's own point of view.
- Create a file named
phpinfo.phpin yourpublic_htmldirectory containing the single line below. - Visit
https://yourdomain.com/phpinfo.php, replacingyourdomain.comwith your own domain. - Search the page for
mailparse. Its own section in the output means the extension is loaded. - Delete the file as soon as you are finished. The output exposes a great deal of detail about your environment to anyone who finds the URL.
<?php phpinfo();
If your plan includes shell access, you can also check from the command line:
php -m | grep -i mailparse
A single line reading mailparse means the extension is loaded for that binary. Treat the browser check as the authoritative one, though: the PHP used for web requests and the PHP invoked on the command line can be different builds with different extension sets.
What to Know Before and After You Enable It
The setting is stored per PHP version
Your extension selection belongs to the PHP version it was made on. Enable mailparse on PHP 8.2, later move the account to PHP 8.4, and the new version starts from its own defaults with Mailparse switched off again. After every PHP version change, reopen Extensions and confirm Mailparse and mbstring are still ticked.
The change applies to the whole account
The Selector sets the PHP version and extension set for the DirectAdmin user account, so every domain on that account running the selected version gets Mailparse. There is no way to enable it for one domain and not another from this screen.
Enable it only where it is needed
Every loaded extension is loaded into each PHP process that serves your site, and that memory counts against your account's resource limits. Mailparse on its own is modest, but it is worth resisting the temptation to tick the rest of the list at the same time.
Mailparse is a parser, not a mail client
It reads message source that something else has already fetched or piped to your script. It does not connect to a mailbox, and enabling it will not by itself make an application collect mail. If your software needs to fetch messages, it will be asking for imap or its own POP3 or IMAP library instead, so check the vendor's requirements page rather than assuming Mailparse covers it.
Troubleshooting
Symptom: the Extensions page shows an error about the native PHP version. Fix: switch the account off native to a numbered PHP version, as described in step 2, then reopen the page.
Symptom: mailparse is not in the list at all. Fix: the module is packaged per PHP version, so it can be absent from the specific version you have selected. Try a neighbouring version, for example 8.3 rather than 8.5, and look again. If it is missing from every version, it is not installed server-side for your account and Noiz support can check it for you.
Symptom: the box is ticked but the application still reports Mailparse as missing. Fix: in order of likelihood, the site is running a different PHP version to the one you edited, the site runs under PHP-FPM and is still being served by a warm process pool (wait a minute or two, or touch a file to trigger a reload), or the application is caching its own environment check.
Symptom: it works through the browser but not from a cron job. Fix: cron jobs and CLI scripts can call a different PHP binary to the one serving your website. Run php -v and php -m from the cron environment to see what it actually uses, and call the full path to the correct binary in the cron command if they differ.
Symptom: Mailparse loads, but headers or attachments decode incorrectly. Fix: confirm mbstring is enabled as covered in step 4, then check that your application is handing Mailparse the raw message source rather than text another layer has already re-encoded or line-wrapped.
Symptom: extensions you enabled some time ago have all reverted. Fix: the account's PHP version was almost certainly changed. Selections are stored per version, so re-enable them on the version now in use.
A Note on PHP Versions
Enabling extensions on a PHP branch that no longer receives security fixes is effort spent propping up a version you should be leaving. As at this review, the PHP project supports the 8.2, 8.3, 8.4 and 8.5 branches. If the account is on an older branch, plan that upgrade first and then set your extensions on the version you land on, since the selection will not follow you across anyway.
Related Noiz Guides
- How to Enable or Disable PHP Extensions Using the CloudLinux Selector in DirectAdmin: the general procedure for any extension, and how to turn one back off.
- How to Change the PHP Version via CloudLinux Selector in DirectAdmin: needed first if the account is still on native PHP.
- How to Enable the GD Extension of PHP Using CloudLinux Selector in DirectAdmin: the same procedure applied to image handling.
- How to Enable ionCube Loader Using CloudLinux Selector in DirectAdmin: required by commercial applications that ship encoded PHP source.
Need a Hand?
If mailparse is not offered on any PHP version, or you are not certain which PHP version your site is genuinely running, open a ticket from the Noiz client area with your domain name, the application that needs Mailparse and the exact error it reports. The Noiz support team can confirm what is available for your account and set it correctly for you.
