我想用INDY 10 / DELPHI删除带有某个标题或某个发件人的邮件。 我已经可以用INDY10查询我的电子邮件帐户了。这是现有的演示代码:
procedure TForm1.BtnCheckClick(Sender: TObject);
var
i: Integer;
Msg: TIdMessage;
MailCount: Integer;
begin
if IdPop31.Connected then
begin
MailCount := IdPOP31.CheckMessages;
lbMailCount.Caption := IntToStr(MailCount);
lbMailboxSize.Caption := IntToStr(IdPOP31.RetrieveMailBoxSize) + ' Bytes';
for i := 1 to MailCount do
begin
Msg := TIdMessage.Create;
try
IdPOP31.RetrieveHeader(i, Msg);
MailsList.Lines.Add(Msg.Subject + ' from ' + Msg.From.Text);
finally
Msg.Free;
end;
end;
end;
end;