Sample code for 30+ languages & platforms
Delphi DLL 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 Delphi DLL Downloads

Delphi DLL
var
success: Boolean;
mailman: HCkMailMan;
filePath: PWideChar;
emailObj: HCkEmail;
email: HCkEmail;

begin
success := False;

mailman := CkMailMan_Create();

//  ...
//  ...

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

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

emailObj := CkMailMan_LoadEml(mailman,filePath);
if (CkMailMan_getLastMethodSuccess(mailman) = False) then
  begin
    Memo1.Lines.Add(CkMailMan__lastErrorText(mailman));
    Exit;
  end;

//  ...
//  ...

CkEmail_Dispose(emailObj);

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

email := CkEmail_Create();
success := CkEmail_LoadEml(email,filePath);
if (success = False) then
  begin
    Memo1.Lines.Add(CkEmail__lastErrorText(email));
    Exit;
  end;

CkMailMan_Dispose(mailman);
CkEmail_Dispose(email);