Delphi DLL
Delphi DLL
Example: MailMan.FetchAll method
Demonstrates how to call the FetchAll method.Chilkat Delphi DLL Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, MailMan, EmailBundle;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Boolean;
mailman: HCkMailMan;
bundle: HCkEmailBundle;
keepOnServer: Boolean;
headersOnly: Boolean;
numBodyLines: Integer;
begin
success := False;
success := False;
mailman := CkMailMan_Create();
// Setup mailman with POP3 server and login settings...
// ...
// ...
bundle := CkEmailBundle_Create();
keepOnServer := True;
headersOnly := False;
// numBodyLines only applies if downloading headers-only.
numBodyLines := 0;
success := CkMailMan_FetchAll(mailman,keepOnServer,headersOnly,numBodyLines,bundle);
if (success = False) then
begin
Memo1.Lines.Add(CkMailMan__lastErrorText(mailman));
Exit;
end;
// ...
// ...
CkMailMan_Dispose(mailman);
CkEmailBundle_Dispose(bundle);
end;