Sample code for 30+ languages & platforms
Perl Requires Chilkat v11.0.0+

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$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;
}