Mailparse is an extension for parsing and working with email messages.
It can deal with rfc822 and rfc2045 (MIME) compliant messages
email mime pecl php
These details are provided for information only. No information here is legal advice and should not be used as such.