ipop3 to tidpop3 a msg to Tidmessage (indy)
itm to jest Tlistview
procedure TForm1.ToolButton1Click(Sender: TObject);
var
iwiad1:integer;
for iwiad1:=1 to ipop3.CheckMessages do
begin
odbierz(iwiad1);
end;
procedure TForm1.odbierz(i: integer);
var
kkk:integer;
coss,cosss:string;
nnnn:string;
ilw:integer;
begin
memo1.Clear;
application.ProcessMessages;
msg.Clear;
ipop3.RetrieveHeader(iwiad1,msg);
itm:=listview1.Items.add;
itm.caption:=Msg.subject;
itm.SubItems.Add(msg.From.Address);
itm.SubItems.Add(IntToStr(iPOP3.RetrieveMsgSize(iwiad1)));
itm.SubItems.Add(DateToStr(Msg.Date));
itm.SubItems.Add(msg.Organization);