Sample code for 30+ languages & platforms
PHP ActiveX

Transition from MailMan.LoadMime to Email.SetFromMimeText

Provides instructions for replacing deprecated LoadMime method calls with Email.SetFromMimeText.

Chilkat PHP ActiveX Downloads

PHP ActiveX
<?php

$success = 0;

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

// ...
// ...

$mimeText = '....';

// ------------------------------------------------------------------------
// The LoadMime method is deprecated:

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

// ...
// ...

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

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


?>