(PHP ActiveX) Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString. Note: This example requires Chilkat v11.0.0 or greater.
<?php
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.MailMan')
$mailman = new COM("Chilkat.MailMan");
// ...
// ...
$xmlBundleStr = '...';
// ------------------------------------------------------------------------
// The LoadXmlString method is deprecated:
// bundleObj is a Chilkat.EmailBundle
$bundleObj = $mailman->LoadXmlString($xmlBundleStr);
if ($mailman->LastMethodSuccess == 0) {
print $mailman->LastErrorText . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXmlString.
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.EmailBundle')
$bundle = new COM("Chilkat.EmailBundle");
$success = $bundle->LoadXmlString($xmlBundleStr);
if ($success == 0) {
print $bundle->LastErrorText . "\n";
exit;
}
?>
|