(PHP ActiveX) Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml. 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");
// ...
// ...
$filePath = 'c:/example/emailBundle.xml';
// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:
// bundleObj is a Chilkat.EmailBundle
$bundleObj = $mailman->LoadXmlFile($filePath);
if ($mailman->LastMethodSuccess == 0) {
print $mailman->LastErrorText . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXml.
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.EmailBundle')
$bundle = new COM("Chilkat.EmailBundle");
$success = $bundle->LoadXml($filePath);
if ($success == 0) {
print $bundle->LastErrorText . "\n";
exit;
}
?>
|