MailParse is an extension for parsing and working with email messages. It can deal with RFC 822 and RFC 2045 (MIME) compliant messages. This article covers installing it on a cPanel server.
1) Install the EPEL repository if not already installed.
yum install epel-release
2) Install the re2c package from EPEL if not already installed.
yum install re2c
3) Use PECL to install the MailParse PHP extension.