Sample code for 30+ languages & platforms
PHP ActiveX Requires Chilkat v11.0.0+

Transition from MailMan.LoadEml to Email.LoadEml

Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml.

Chilkat PHP ActiveX Downloads

PHP ActiveX
<?php

$success = 0;

$mailman = new COM("Chilkat.MailMan");

//  ...
//  ...

$filePath = 'c:/dir/example.eml';

//  ------------------------------------------------------------------------
//  The MailMan.LoadEml method is deprecated:

// emailObj is a Chilkat.Email
$emailObj = $mailman->LoadEml($filePath);
if ($mailman->LastMethodSuccess == 0) {
    print $mailman->LastErrorText . "\n";
    exit;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using Email.LoadEml.

$email = new COM("Chilkat.Email");
$success = $email->LoadEml($filePath);
if ($success == 0) {
    print $email->LastErrorText . "\n";
    exit;
}


?>