Skip to content

Instantly share code, notes, and snippets.

@JoshuaGross
Created June 29, 2010 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshuaGross/457772 to your computer and use it in GitHub Desktop.
Save JoshuaGross/457772 to your computer and use it in GitHub Desktop.
require_once('Mail/mimeDecode.php');
$mail = file_get_contents($filename);
$params['include_bodies'] = true;
$params['decode_bodies'] = true;
$params['decode_headers'] = true;
$decoder = new Mail_mimeDecode($mail);
$structure = $decoder->decode($params);
print $structure->body;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment