TNMPOP3中发信地址怎么得到(50分)

  • 主题发起人 周晓晖
  • 开始时间

周晓晖

Unregistered / Unconfirmed
GUEST, unregistred user!
1。如题
2。DELPHI中的书签怎么保留下来,每次重打开时就没了
 
1. NMPOP31.GetMailMessage(M);
NMPOP31.MailMessage.From为发信地址
2. 听~~
 
procedure TForm1.BtnPOPClick(Sender: TObject);
var
i: Integer;
begin
try
BtnPOP.Enabled := False;
ClosePOP.Enabled := True;
with ServerPOP3do
begin
SBar.SimpleText := '正在接收邮件......';
Application.ProcessMessages;
AttachFilePath := 'D:/temp';
DeleteOnRead := FALSE;
ReportLevel := Status_Basic;
TimeOut := 20000;
Host := POPEdit.Text;
Port := 110;
UserID := UserIDEdit.text;
Password := PAsswordEdit.text;
Connect;
Label3.caption := '已接收信件列表:'+IntToStr(MailCount);
GridList.RowCount := MailCount + 1;
if GridList.Rowcount < 2 then
GridList.RowCount := 2;
GridList.Cells[0,0] := '发件人地址';
GridList.Cells[1,0] := '主题';
for i := 1 to MailCountdo
begin
GetMailMessage(i);
// GetSummary(i);
GridList.Cells[0,i] := MailMessage.From;
GridList.Cells[1,i] := MailMessage.Subject;
// GridList.Cells[0,i] := Summary.From;
// GridList.Cells[1,i] := Summary.Subject;
end;
// DisConnect;
end;
finally
SBar.SimpleText := '接收邮件完毕 '+IntToStr(ServerPOP3.BytesRecvd)+
' 字节 '+IntToStr(ServerPOP3.BytesTotal)+' 接收';
Application.ProcessMessages;
// BtnPOP.Enabled := True;
end;
end;
 
多人接受答案了。
 

Similar threads

回复
0
查看
658
不得闲
D
回复
0
查看
793
DelphiTeacher的专栏
D
D
回复
0
查看
747
DelphiTeacher的专栏
D
D
回复
0
查看
736
DelphiTeacher的专栏
D
顶部