(PHP Extension) 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
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
$mailman = new CkMailMan();
// ...
// ...
$filePath = 'c:/example/emailBundle.xml';
// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:
// bundleObj is a CkEmailBundle
$bundleObj = $mailman->LoadXmlFile($filePath);
if ($mailman->get_LastMethodSuccess() == false) {
print $mailman->lastErrorText() . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXml.
$bundle = new CkEmailBundle();
$success = $bundle->LoadXml($filePath);
if ($success == false) {
print $bundle->lastErrorText() . "\n";
exit;
}
?>
|