我想将 POP3 消息中的标题文本检索到 TMemo 中。我无法弄清楚如何做到这一点。这是我到目前为止所得到的:
try
IdPOP31.Connect();
MsgCount := IdPOP31.CheckMessages;
for i:= 1 to MsgCount do
begin
try
FMailMessage := TIdMessage.Create(nil);
IdPOP31.Retrieve(i,FMailMessage);
Memo1.Lines.Add('Mesage #: ' + IntToStr(i);
Memo1.Lines.Add('From name: ' + FMailMessage.From.Name);
Memo1.Lines.Add('From address: ' + FMailMessage.Sender.Address);
Memo1.Lines.Add('Subject: ' + FMailMessage.Subject);
Memo1.Lines.Add('From:' + FMailMessage.From.Address);
Memo1.Lines.Add('Recipients: ' + FMailMessage.Recipients.EMailAddresses);
// HOW DO I GET THE HEADER ???????
Memo1.Lines.Add(FMailMessage.Body.Text);
Memo1.Lines.Add('=================================================');
finally
FMailMessage.Free;
end;
IdPOP31.Disconnect;
end;