Sample code for 30+ languages & platforms
PHP Extension

Transition from MailMan.LoadEml to Email.LoadEml

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

Chilkat PHP Extension Downloads

PHP Extension
<?php

include("chilkat.php");

$success = false;

$mailman = new CkMailMan();

// ...
// ...

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

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

// emailObj is a CkEmail
$emailObj = $mailman->LoadEml($filePath);
if ($mailman->get_LastMethodSuccess() == false) {
    print $mailman->lastErrorText() . "\n";
    exit;
}

// ...
// ...

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

$email = new CkEmail();
$success = $email->LoadEml($filePath);
if ($success == false) {
    print $email->lastErrorText() . "\n";
    exit;
}


?>