<?php require_once 'Mail/mimeDecode.php'; ... $params['include_bodies'] = true; $params['decode_bodies'] = true; $params['decode_headers'] = true; $decoder = new Mail_mimeDecode($input); $structure = $decoder->decode($params); ?> <?php ... $params['include_bodies'] = true; $params['decode_bodies'] = false; $params['decode_headers'] = true; $params['input'] = $input; $params['crlf']