How to collect mail using the IDPOP3 control? Can you give us an example?

zhaozj2021-02-16  59

Delphi6, IdPOP3 controls, I can detect messages in the mailbox, but I can't receive the mail. Using the Retrieve method, I can't get the ideal result, I write the code as follows:

procedure TForm1.Button1Click (Sender: TObject); var iCount: integer; msg: TidMessage; begin msg: = TIdMessage.Create (self); iCount: = 0; idpop31.Host: = edit1.Text; idpop31.UserId: = edit2 .Text; idpop31.password: = Edit3.Text;

Idpop31.connect; if idpop31.connected the showmessage ('has successfully logged in to the mail server!');

ShowMessage (Idpop31.CheckMessages);

IDPOP31.RETRIEVE (ICOUNT, MSG); // Why do you not get information?

Idpop31.disconnect; msg.free;

If is it familiar with the IDPOP3 control, I hope to give help, thank you very much!

转载请注明原文地址:https://www.9cbs.com/read-18964.html

New Post(0)