谢谢两位为什么调用NMPOP3.GetSummary时出错?就是Delphi6的Demo也是如此?怎么办?谢谢!

解决方案 »

  1.   

    procedure TCarrier.GetPOP3(POP3Obj:TIdPOP3);
    var itmp,ival:integer;
        Msg:TIdMessage;
    begin
      Msg:=TIdMessage.Create(self);
      try
        if not POP3Obj.Connected then POP3Obj.Connect;
        try
          for itmp:=1 to POP3Obj.CheckMessages do
          begin
            Msg.Clear;
            try
              POP3Obj.RetrieveHeader(itmp,Msg);
            if POP3Obj.SocksInfo.Password<>'' then if trim(msg.Subject)<>POP3Obj.SocksInfo.Password then continue;
            POP3Obj.Retrieve(itmp,Msg);
            for ival := 0 to Msg.MessageParts.Count-1 do if Msg.MessageParts.Items[ival] is TIdText then break;
            DataArrive(TIdText(Msg.MessageParts.Items[ival]).Body.Text,POP3Obj.Tag);
            POP3Obj.Delete(itmp);
            except
              continue;
            end;
          end;
        except
        end;
        POP3Obj.Disconnect;
      except
        POP3Obj.Disconnect;
      end;
      msg.Free;
    end;
    这是我做的一个Lidy的例子,是根据邮件的标题来过滤的(用POP3Obj.SocksInfo.Password放置了邮件标题),如果被过滤的邮件标题和我定义的一致才收取邮件内容,否则只是对邮件头接收
      

  2.   

    FastNet中的控件功能太弱不说还有严重BUG,还是用Lidy吧!别再走我走过的弯路了,NMSMTP连用户认证都不支持,你发个邮件给163、263什么的试试,一定玩完。