PHP ActiveX
PHP ActiveX
Transition from Imap.ThreadCmd to Imap.QueryThread
Provides instructions for replacing deprecated ThreadCmd method calls with QueryThread.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$imap = new COM("Chilkat.Imap");
// ...
// ...
$threadAlg = 'REFERENCES';
$charset = 'UTF-8';
$searchCriteria = 'SUBJECT a';
$bUid = 1;
// ------------------------------------------------------------------------
// The ThreadCmd method is deprecated:
// jsonObj is a Chilkat.JsonObject
$jsonObj = $imap->ThreadCmd($threadAlg,$charset,$searchCriteria,$bUid);
if ($imap->LastMethodSuccess == 0) {
print $imap->LastErrorText . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using QueryThread.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument and filled upon success.
$imap->SearchCharset = 'UTF-8';
$json = new COM("Chilkat.JsonObject");
$success = $imap->QueryThread($threadAlg,$searchCriteria,$bUid,$json);
if ($success == 0) {
print $imap->LastErrorText . "\n";
exit;
}
?>