PHP ActiveX
PHP ActiveX
Transition from MailMan.LoadXmlEmailString to Email.SetFromXmlText
Provides instructions for replacing deprecated LoadXmlEmailString method calls with Email.SetFromXmlText.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$mailman = new COM("Chilkat.MailMan");
// ...
// ...
$xmlStr = '...';
// ------------------------------------------------------------------------
// The LoadXmlEmailString method is deprecated:
// emailObj is a Chilkat.Email
$emailObj = $mailman->LoadXmlEmailString($xmlStr);
if ($mailman->LastMethodSuccess == 0) {
print $mailman->LastErrorText . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using Email.SetFromXmlText.
$email = new COM("Chilkat.Email");
$success = $email->SetFromXmlText($xmlStr);
if ($success == 0) {
print $email->LastErrorText . "\n";
exit;
}
?>