PHP ActiveX
PHP ActiveX
Transition from Email.CreateMdn to Email.ToMdn
Provides instructions for replacing deprecated CreateMdn method calls with ToMdn.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$email = new COM("Chilkat.Email");
// ...
// ...
$explanation = '...';
$statusFieldsXml = '...';
$headerOnly = 0;
// ------------------------------------------------------------------------
// The CreateMdn method is deprecated:
// emailObj is a Chilkat.Email
$emailObj = $email->CreateMdn($explanation,$statusFieldsXml,$headerOnly);
if ($email->LastMethodSuccess == 0) {
print $email->LastErrorText . "\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 = new COM("Chilkat.Email");
$success = $email->ToMdn($explanation,$statusFieldsXml,$headerOnly,$emailOut);
if ($success == 0) {
print $email->LastErrorText . "\n";
exit;
}
?>