ShowMessage (' accept email connect before... ');
IdPOP31. The Connect ();
ShowMessage (' accept email connect sucessful... ');
Mailcount:=IdPOP31. CheckMessages;
ShowMessage (' mailcount: + IntToStr (mailcount));
For I:=1 to mailcount do
The begin
IdMessage1. The Clear;
Memo2. Lines. The Add (' -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ');
ShowMessage (' RetrieveHeader before... ');
Try
IdPOP31. RetrieveHeader (I, IdMessage1);
The finally
end;
ShowMessage (' RetrieveHeader after... ');
ShowMessage (IdBase64Decoder1 CodeString (IdMessage1. Subject));
Sub:=IdMessage1. Subject;
Memo2. Lines. The Add (IdBase64Decoder1 CodeString (sub));
IdPOP31. Retrieve (I, IdMessage1);
//TMP:=IdMessage1. Body. The Text;
Memo2. Lines. The Add (IdMessage1. Body. The Text).
end;
IdPOP31. Disconnect;
In the code try
IdPOP31. RetrieveHeader (I, IdMessage1);
The finally
Can only read the mail number, can't read the email content
Hope which great god help me solve the