Result for .eml with "Return-path:" in first line:";
echo "MIME Type: " . $info . "";
$finfo = finfo_open(FILEINFO_MIME_ENCODING, $magicfile);
$info = finfo_file($finfo, $filename);
echo "MIME Encoding: " . $info . "";
$finfo = finfo_open(FILEINFO_CONTINUE, $magicfile);
$info = finfo_file($finfo, $filename);
echo "Description: " . $info . "";
/* close connection */
finfo_close($finfo);
$finfo = finfo_open(FILEINFO_MIME_TYPE, $magicfile); // return mime type ala mimetype extension
$filename = "/var/www/mime_test/mime_types_Return-Path.eml";
$info = finfo_file($finfo, $filename);
echo "Result for .eml with "Return-Path:" in first line:";
echo "MIME Type: " . $info . "";
$finfo = finfo_open(FILEINFO_MIME_ENCODING, $magicfile);
$info = finfo_file($finfo, $filename);
echo "MIME Encoding: " . $info . "";
$finfo = finfo_open(FILEINFO_CONTINUE, $magicfile);
$info = finfo_file($finfo, $filename);
echo "Description: " . $info . "";
/* close connection */
finfo_close($finfo);
?>