Sample code for 30+ languages & platforms
Perl

Transition from MailMan.LoadXmlEmailString to Email.SetFromXmlText

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

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$mailman = chilkat::CkMailMan->new();

# ...
# ...

$xmlStr = "...";

# ------------------------------------------------------------------------
# The LoadXmlEmailString method is deprecated:

# emailObj is a Email
$emailObj = $mailman->LoadXmlEmailString($xmlStr);
if ($mailman->get_LastMethodSuccess() == 0) {
    print $mailman->lastErrorText() . "\r\n";
    exit;
}

# ...
# ...

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

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