How to Enable the Mailparse PHP Extension Using CloudLinux Selector in cPanel

Mailparse is a PHP extension for reading and splitting apart email messages. Applications that pipe incoming mail into a script, import mailboxes, or read MIME parts and attachments (helpdesk and ticketing systems, mailing list tools, some CRM and webmail add-ons) commonly ask for it. It is not compiled into PHP by default, so you have to switch it on for your account before the application can use it.

This guide shows you how to enable Mailparse for your cPanel account using the CloudLinux PHP Selector, which cPanel surfaces under the name Select PHP Version. It also covers the two things that trip people up most often: the native PHP version error, and the mbstring dependency that Mailparse quietly relies on.

Last reviewed: 27 July 2026, against cPanel & WHM version 134 (the current stable and LTS tier in cPanel's own release tiers) with the CloudLinux PHP Selector plugin. This guide is written for Noiz hosting and is kept current against cPanel and CloudLinux. It complements, and does not replace, the official documentation linked below.

Official Documentation Reference

Prerequisites

  • Access to your cPanel account.
  • A Select PHP Version icon in the Software section. If it is missing, PHP Selector is not enabled for your package and Noiz support can confirm what is available on your plan.
  • Your account set to a selectable (alt-PHP) version rather than the server's native PHP. The steps below cover this if you are not sure.

Understand What You Are Changing

Two different tools in cPanel deal with PHP, and they do not do the same job:

  • Select PHP Version (CloudLinux PHP Selector) sets the PHP version and the extension set for your cPanel account. Extension changes made here apply to every domain on the account that runs the selected version.
  • MultiPHP Manager sets the PHP version per domain. It does not manage individual extensions.

Enabling Mailparse is an extension change, so it belongs in Select PHP Version. Bear in mind that if you later switch PHP version, the extension list is tracked per version, so you may need to tick Mailparse again on the new version.

Enable the Mailparse Extension

1. Open Select PHP Version

Log in to your cPanel account. In the Software section, click Select PHP Version.

The Select PHP Version icon in the Software section of cPanel

2. Open the Extensions view

Click the Extensions menu (shown as an Extensions tab or a drop-down beside the version selector, depending on the interface version your server runs).

The Extensions tab in the CloudLinux PHP Selector interface in cPanel

Note: if the Extensions view shows an error about the native PHP version, your account is running the server's built-in PHP rather than a selectable one. The selector cannot manage extensions for native PHP. Go back to the Current PHP version view, choose a specific version from the list (for example 8.2 or 8.3 rather than native), apply it, then return to Extensions.

3. Tick Mailparse

Find mailparse in the extension list and tick its checkbox. The change saves automatically and a confirmation message appears reading that the module mailparse is saved. There is no separate Save button, and no need to reload the page.

Ticking the mailparse checkbox in the CloudLinux PHP Selector extensions list, with the saved confirmation message

4. Tick mbstring as well

Mailparse depends on the mbstring extension for its character set handling, and the PHP manual lists mbstring as necessary for Mailparse to work. It is usually on already, but it is worth confirming while you are on this screen. If mbstring is unticked, tick it too. Skipping this is the most common reason Mailparse appears enabled yet the application still misbehaves on encoded headers and multipart messages.

Confirm Mailparse Is Loaded

Do not rely on the checkbox alone. Confirm the extension is actually loaded by the PHP handler your site runs on, using either method:

  • From a page: create a temporary file in your document root containing <?php phpinfo();, load it in a browser, and search the output for mailparse. Delete the file immediately afterwards, as phpinfo output exposes a lot of detail about your environment.
  • From SSH or Terminal, if your plan includes shell access:
php -m | grep -i mailparse

A single line reading mailparse means the extension is loaded. An empty result means it is not, for that binary at least. See the note on cron and CLI below.

Troubleshooting

Symptom: the Extensions view returns an error about native PHP. The selector only manages alt-PHP versions. Switch the account off native to a numbered PHP version first, as described in step 2.

Symptom: mailparse is not in the list at all. The module is packaged per PHP version, so it may be absent from the specific version you have selected. Try a neighbouring version (for example 8.2 instead of 8.4) and check again. If it is missing from every version, the module is not installed server-side for your account, and Noiz support can look into it for you.

Symptom: the tick saves, but your application still reports the extension as missing. The usual causes, in order of likelihood: the site is running on a different PHP version to the one you edited (check MultiPHP Manager for that domain), the site runs under PHP-FPM and is still serving from a warm pool (wait a minute or two, or make a trivial change to trigger a reload), or an application-level cache is holding a stale environment check.

Symptom: it works in the browser but not from cron. Cron jobs and CLI scripts can invoke a different PHP binary to the one serving your website. Run php -v and php -m from your cron environment to see what it actually uses, and call the full path to the correct binary in the cron command if the versions differ.

Symptom: Mailparse loads but attachments or headers decode incorrectly. Check mbstring is enabled as covered in step 4, then confirm the application is passing raw message source to Mailparse rather than text that has already been altered by another layer.

Related Noiz Guides

Need a Hand?

If the extension will not enable, or you are not certain which PHP version your site is actually running on, open a ticket from the Noiz client area with your domain name and the application that needs Mailparse. The Noiz support team can check the account's PHP configuration and enable the extension for you.

  • 0 Users Found This Useful
  • cpanel, php, cloudlinux, selector
Was this answer helpful?

Related Articles

How to Change the PHP Version Using the CloudLinux Selector in cPanel

On Noiz cPanel hosting that runs CloudLinux, the Select PHP Version tool (usually called the...

How to Enable ionCube Loader Using CloudLinux Selector in cPanel

The ionCube Loader is a PHP extension that lets your server run PHP files which have been...

How to Enable the PHP GD Extension Using the CloudLinux Selector in cPanel

GD is PHP's built-in image processing library. If a site needs to resize an upload, generate a...

How to Enable or Disable PHP Extensions Using the CloudLinux Selector in cPanel

PHP extensions (also called PHP modules) are the optional libraries that give PHP its extra...

How to Enable or Disable PHP's allow_url_fopen Using CloudLinux Selector in cPanel

allow_url_fopen is the PHP directive that decides whether your code is allowed to treat a remote...