I am about to start a project that requires an email to be somehow ran through a PHP script. I have full control of the server that the email will be sent to and wondered if people could give me some thoughts or pointers as to the most elegant way parsing it with PHP. I am not editing the email and then forwarding it on.

The server is CentOS with Exim email.

Thanks in advance.