Delphi ActiveX Requires Chilkat v11.0.0+
Delphi ActiveX
Transition from MailMan.LoadXmlEmailString to Email.SetFromXmlText
Provides instructions for replacing deprecated LoadXmlEmailString method calls with Email.SetFromXmlText.Chilkat Delphi ActiveX Downloads
var
success: Integer;
mailman: TChilkatMailMan;
xmlStr: WideString;
emailObj: IChilkatEmail;
email: TChilkatEmail;
begin
success := 0;
mailman := TChilkatMailMan.Create(Self);
// ...
// ...
xmlStr := '...';
// ------------------------------------------------------------------------
// The LoadXmlEmailString method is deprecated:
emailObj := mailman.LoadXmlEmailString(xmlStr);
if (mailman.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(mailman.LastErrorText);
Exit;
end;
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using Email.SetFromXmlText.
email := TChilkatEmail.Create(Self);
success := email.SetFromXmlText(xmlStr);
if (success = 0) then
begin
Memo1.Lines.Add(email.LastErrorText);
Exit;
end;