CkPhp Requires Chilkat v11.0.0+
CkPhp
Pass an Email object to the MIME API
See more Email Object Examples
Serialize an Email into a fresh BinData buffer and load those bytes into Mime to inspect the tree. Keep the original file separately when byte-for-byte preservation matters, such as for DKIM verification.
Chilkat CkPhp Downloads
<?php
include("chilkat.php");
$success = false;
// Assumes Chilkat is unlocked. See Global Unlock Sample.
$email = new CkEmail();
$success = $email->LoadEml('message.eml');
if ($success != true) {
print $email->lastErrorText() . "\n";
exit;
}
$mimeBytes = new CkBinData();
$success = $email->GetMimeBd($mimeBytes);
if ($success != true) {
print $email->lastErrorText() . "\n";
exit;
}
$mime = new CkMime();
$success = $mime->LoadMimeBd($mimeBytes);
if ($success != true) {
print $mime->lastErrorText() . "\n";
exit;
}
print $mime->getStructure('text') . "\n";
?>