收邮件收不到正文和附件,IdMessage.MessageParts.Count总是等于0,详情请看(200)

  • 主题发起人 主题发起人 qi_jianzhou
  • 开始时间 开始时间
Q

qi_jianzhou

Unregistered / Unconfirmed
GUEST, unregistred user!
用IDPOP3收邮件的时候IdMessage.MessageParts.Count总是等于0标题等信息都能收到, 就是收不到正文和附件,试验了N总邮箱都不好使。代码如下 IdPOP3.Retrieve(lvHeaders.Selected.Index + 1, IdMessage); //Setup fields on screen from MSG Subject.Caption := GetTitle(IdMessage.Subject); From.Caption := GetTitle(IdMessage.From.Text); Recipients.Caption := GetTitle(IdMessage.Recipients.EmailAddresses); //Setup attachments list for intIndex := 0 to Pred(IdMessage.MessageParts.Count) do begin if (IdMessage.MessageParts.Items[intIndex] is TIdAttachment) then begin //general attachment li := lvMessageParts.Items.Add; li.ImageIndex := 8; li.Caption := TIdAttachment(IdMessage.MessageParts.Items[intIndex]).Filename; end else begin //body text if IdMessage.MessageParts.Items[intIndex] is TIdText then begin Memo.Lines.Clear; Memo.Lines.AddStrings(TIdText(IdMessage.MessageParts.Items[intIndex]).Body); end end; end;谁能帮忙解决一下 谢谢了
 
哪位能帮帮忙啊!谢谢了
 
后退
顶部