1
pecl install mailparse
123456789101112
<?phprequire_once __DIR__ . '/../vendor/autoload.php';$path = __DIR__ . '/xxx.eml';$parser = new PhpMimeMailParser\Parser();$parser->setPath($path);$parser->setStream(fopen($path, "r"));$html = $parser->getMessageBody('html');var_dump($html);