Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading mail, why isn't this working??

Status
Not open for further replies.

auditdi30

Programmer
Feb 25, 2009
39
NO
first I made a onformactivate event with this code;

procedure Tpop3skjerm.FormActivate(Sender: TObject);
var t : integer;
msg : tidmessage;
begin
form1.pop3.Connect(5000);
info.RowCount:=strtoint(form1.email.caption)+1;

info.cells[0,0]:='Mail fra';
info.cells[1,0]:='Emne';

for t:=1 to info.rowcount-1 do begin
if form1.pop3.retrieve(t,form1.idmessage1)=true then begin
info.cells[0,t]:=form1.IdMessage1.from.text;
info.cells[1,t]:=form1.IdMessage1.Subject;
form1.idmessage1.clear;
end;
end;

form1.pop3.Disconnect;
end;

then when user doubleclick, i use this code;

procedure Tpop3skjerm.infoDblClick(Sender: TObject);
begin
form1.pop3.Connect(5000);
if form1.pop3.retrieve(info.row,form1.idmessage1)=true then begin
memo1.lines.add(form1.IdMessage1.Body.text);
end;
form1.pop3.disconnect;
end;

But the message won't appear in the memo box. What is wrong??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top