Sample code for 30+ languages & platforms
PHP Extension

Transition from MailMan.LoadXmlEmailString to Email.SetFromXmlText

Provides instructions for replacing deprecated LoadXmlEmailString method calls with Email.SetFromXmlText.

Chilkat PHP Extension Downloads

PHP Extension
<?php

include("chilkat.php");

$success = false;

$mailman = new CkMailMan();

// ...
// ...

$xmlStr = '...';

// ------------------------------------------------------------------------
// The LoadXmlEmailString method is deprecated:

// emailObj is a CkEmail
$emailObj = $mailman->LoadXmlEmailString($xmlStr);
if ($mailman->get_LastMethodSuccess() == false) {
    print $mailman->lastErrorText() . "\n";
    exit;
}

// ...
// ...

// ------------------------------------------------------------------------
// Do the equivalent using Email.SetFromXmlText.

$email = new CkEmail();
$success = $email->SetFromXmlText($xmlStr);
if ($success == false) {
    print $email->lastErrorText() . "\n";
    exit;
}


?>