用DELPHI6的indy控件组里的TIsSMTP发送不了邮件?
提示: 503 bad sequence of commands
请问有什么问题?

解决方案 »

  1.   

    试试升级indy
    如果还不行的话可能是验证设置有否
      

  2.   

    代码如下:
    begin
      with IdMsgSend do
      begin
        Body.Assign(Memo1.Lines);
        From.Text := UserEmail;
        Recipients.EMailAddresses := edtTo.Text; { To: header }
        Subject := edtSubject.Text; { Subject: header }
        Priority := TIdMessagePriority(cboPriority.ItemIndex); { Message Priority }
        CCList.EMailAddresses := edtCC.Text; {CC}
        BccList.EMailAddresses := edtBCC.Text; {BBC}
        if chkReturnReciept.Checked then
        begin {We set the recipient to the From E-Mail address }
          ReceiptRecipient.Text := From.Text;
        end
        else
        begin {indicate that there is no receipt recipiant}
          ReceiptRecipient.Text := '';
        end;
      end;  {authentication settings}
      {case SmtpAuthType of
        0: SMTP.AuthenticationType := atNone;
        1: SMTP.AuthenticationType := atLogin;  
      end;
      }
      SMTP.AuthenticationType := atLogin; {Simple Login}  SMTP.UserID := SmtpServerUser;
      SMTP.Password := SmtpServerPassword;  {General setup}
      SMTP.Host := SmtpServerName;
      SMTP.Port := SmtpServerPort;  {now we send the message}
      SMTP.Connect;
      try
        //SMTP.Authenticate;
        SMTP.Send(IdMsgSend);
      finally
        SMTP.Disconnect;
      end;
    end;这段代码就是DELPHI自带那个DEMO的代码,请问是怎么回事,为什么发不了呢?
      

  3.   

    {authentication settings} 
      {case SmtpAuthType of 
        0: SMTP.AuthenticationType := atNone; 
        1: SMTP.AuthenticationType := atLogin;  
      end; 
      } 
      SMTP.AuthenticationType := atLogin; {Simple Login} 
    看看这个是否和服务器要求的一致
      

  4.   

    163用INDY有问题。
    可以考虑用fastnet.
      

  5.   

    fastnet 试过了,也发不了。
    indy 没有解决的方法吗?
      

  6.   

    需要打开//SMTP.Authenticate; 这句。
    [email protected]不需要这句也可以,但[email protected]必须要这句
      

  7.   

    如果打开//SMTP.Authenticate; 这句,
    则提示 "550用户被锁定"
    不管QQ还是163的邮箱都有这个提示.
      

  8.   

    163 你得先用foxmail 先测试下 .早期的163是开通了POP3功能的. 从06好像之后的就只能是WEB接收了. 
      

  9.   

    163去年又开通了对pop3的功能,因为我用outlook都可以发到163的。