(Perl) Transition from MailMan.LoadEml to Email.LoadEml
Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml. Note: This example requires Chilkat v11.0.0 or greater.
use chilkat();
$mailman = chilkat::CkMailMan->new();
# ...
# ...
$filePath = "c:/dir/example.eml";
# ------------------------------------------------------------------------
# The MailMan.LoadEml method is deprecated:
# emailObj is a Email
$emailObj = $mailman->LoadEml($filePath);
if ($mailman->get_LastMethodSuccess() == 0) {
print $mailman->lastErrorText() . "\r\n";
exit;
}
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using Email.LoadEml.
$email = chilkat::CkEmail->new();
$success = $email->LoadEml($filePath);
if ($success == 0) {
print $email->lastErrorText() . "\r\n";
exit;
}
|