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

Transition from MailMan.LoadMime to Email.SetFromMimeText

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

Chilkat Delphi ActiveX Downloads

Delphi ActiveX
var
success: Integer;
mailman: TChilkatMailMan;
mimeText: WideString;
emailObj: IChilkatEmail;
email: TChilkatEmail;

begin
success := 0;

mailman := TChilkatMailMan.Create(Self);

//  ...
//  ...

mimeText := '....';

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

emailObj := mailman.LoadMime(mimeText);
if (mailman.LastMethodSuccess = 0) then
  begin
    Memo1.Lines.Add(mailman.LastErrorText);
    Exit;
  end;

//  ...
//  ...

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

email := TChilkatEmail.Create(Self);
success := email.SetFromMimeText(mimeText);
if (success = 0) then
  begin
    Memo1.Lines.Add(email.LastErrorText);
    Exit;
  end;