PHP Extension
PHP Extension
Transition from Imap.FetchBundle to Imap.FetchMsgSet
Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.Chilkat PHP Extension Downloads
<?php
include("chilkat.php");
$success = false;
$imap = new CkImap();
// ...
// ...
$mset = new CkMessageSet();
$success = $imap->QueryMbx('FROM joe@example.com',true,$mset);
// ...
// ...
// ------------------------------------------------------------------------
// The FetchBundle method is deprecated:
// bundleObj is a CkEmailBundle
$bundleObj = $imap->FetchBundle($mset);
if ($imap->get_LastMethodSuccess() == false) {
print $imap->lastErrorText() . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using FetchMsgSet.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
$headersOnly = false;
$bundleOut = new CkEmailBundle();
$success = $imap->FetchMsgSet($headersOnly,$mset,$bundleOut);
if ($success == false) {
print $imap->lastErrorText() . "\n";
exit;
}
?>