Sample code for 30+ languages & platforms
PHP ActiveX

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

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

Chilkat PHP ActiveX Downloads

PHP ActiveX
<?php

$success = 0;

$mailman = new COM("Chilkat.MailMan");

// ...
// ...

$filePath = 'c:/example/emailBundle.xml';

// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:

// bundleObj is a Chilkat.EmailBundle
$bundleObj = $mailman->LoadXmlFile($filePath);
if ($mailman->LastMethodSuccess == 0) {
    print $mailman->LastErrorText . "\n";
    exit;
}

// ...
// ...

// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXml.

$bundle = new COM("Chilkat.EmailBundle");
$success = $bundle->LoadXml($filePath);
if ($success == 0) {
    print $bundle->LastErrorText . "\n";
    exit;
}


?>