(Perl) 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.
use chilkat();
$mailman = chilkat::CkMailMan->new();
# ...
# ...
$xmlBundleStr = "...";
# ------------------------------------------------------------------------
# The LoadXmlString method is deprecated:
# bundleObj is a EmailBundle
$bundleObj = $mailman->LoadXmlString($xmlBundleStr);
if ($mailman->get_LastMethodSuccess() == 0) {
print $mailman->lastErrorText() . "\r\n";
exit;
}
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using EmailBundle.LoadXmlString.
$bundle = chilkat::CkEmailBundle->new();
$success = $bundle->LoadXmlString($xmlBundleStr);
if ($success == 0) {
print $bundle->lastErrorText() . "\r\n";
exit;
}
|