Perl
Perl
Transition from Email.CreateMdn to Email.ToMdn
Provides instructions for replacing deprecated CreateMdn method calls with ToMdn.Chilkat Perl Downloads
use chilkat();
$success = 0;
$email = chilkat::CkEmail->new();
# ...
# ...
$explanation = "...";
$statusFieldsXml = "...";
$headerOnly = 0;
# ------------------------------------------------------------------------
# The CreateMdn method is deprecated:
# emailObj is a Email
$emailObj = $email->CreateMdn($explanation,$statusFieldsXml,$headerOnly);
if ($email->get_LastMethodSuccess() == 0) {
print $email->lastErrorText() . "\r\n";
exit;
}
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using ToMdn.
# Your application creates a new, empty Email object which is passed
# in the last argument and filled upon success.
$emailOut = chilkat::CkEmail->new();
$success = $email->ToMdn($explanation,$statusFieldsXml,$headerOnly,$emailOut);
if ($success == 0) {
print $email->lastErrorText() . "\r\n";
exit;
}