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