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