(Delphi ActiveX) Example: MailMan.FetchAll method
Demonstrates how to call the FetchAll method. Note: This example requires Chilkat v11.0.0 or greater.
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Integer;
mailman: TChilkatMailMan;
bundle: TChilkatEmailBundle;
keepOnServer: Integer;
headersOnly: Integer;
numBodyLines: Integer;
begin
success := 0;
success := 0;
mailman := TChilkatMailMan.Create(Self);
// Setup mailman with POP3 server and login settings...
// ...
// ...
bundle := TChilkatEmailBundle.Create(Self);
keepOnServer := 1;
headersOnly := 0;
// numBodyLines only applies if downloading headers-only.
numBodyLines := 0;
success := mailman.FetchAll(keepOnServer,headersOnly,numBodyLines,bundle.ControlInterface);
if (success = 0) then
begin
Memo1.Lines.Add(mailman.LastErrorText);
Exit;
end;
// ...
// ...
end;
|