Delphi DLL Requires Chilkat v11.0.0+
Delphi DLL
Export HTML and related files into a directory
See more Email Object Examples
Choose a separate directory for each message. UnpackHtml writes the HTML file, exports its related resources, and rewrites links to their local paths. This is useful when images should remain separate files.
Chilkat Delphi DLL Downloads
var
success: Boolean;
email: HCkEmail;
begin
success := False;
// Assumes Chilkat is unlocked. See Global Unlock Sample.
email := CkEmail_Create();
success := CkEmail_LoadEml(email,'inline-image.eml');
if (success <> True) then
begin
Memo1.Lines.Add(CkEmail__lastErrorText(email));
Exit;
end;
if (CkEmail_HasHtmlBody(email) <> True) then
begin
Memo1.Lines.Add('This message has no HTML body.');
Exit;
end;
success := CkEmail_UnpackHtml(email,'workshop-preview','index.html','images');
if (success <> True) then
begin
Memo1.Lines.Add(CkEmail__lastErrorText(email));
Exit;
end;
Memo1.Lines.Add('Saved workshop-preview/index.html and its related files.');
CkEmail_Dispose(email);