| procedure TForm1.btnDownloadClick(Sender: TObject); |
| var |
| msgNo: Integer; |
| begin |
| if clPOP3.Active then Exit; |
| |
| clPOP3.Server := 'mail.test.com'; |
| clPOP3.Password := 'test'; |
| clPOP3.UserName := 'test'; |
| clPOP3.UseTLS := ctNone; |
| clPOP3.UseSasl := False; |
| clPOP3.Open(); |
| |
| msgNo := 1; |
| ProgressBar1.Position := 0; |
| |
| clPOP3.Retrieve(msgNo); |
| |
| clPOP3.Close(); |
| end; |
| |
| |
procedure TForm1. clPOP3Progress(Sender: TObject;
ABytesProceed, ATotalBytes: Integer); |
| begin |
| ProgressBar1.Max := ATotalBytes; |
| ProgressBar1.Position := ABytesProceed; |
| end; |
| |
| |
Article ID: 36, Created On: 1/23/2010, Modified: 1/23/2010