关于  indy 10 用IDSMTP发邮件问题:
情况如下:
1.如果无附件,正常发送后对方能收到
2.有附件,且大小在2M以内,正常发送后对方能收到
3.有附件,且单个文件大小 超过4M,发送时提示
Socket Error # 10053
Software caused connection abort.
或者
Socket Error # 10054
Connection reset by peer.
怎么找也找不出问题,
请问高手能来帮忙解答一下万分感谢

解决方案 »

  1.   

    To :TjianLiang
    这个我注意过了我,我发Gmail邮箱也不对
      

  2.   

    我把的的线程里的代码贴出来
    constructor ThreadSendMail.Create(AidSend:TIdSMTP;Aidmsg:TIdMessage);
     Begin
        idsend := AidSend;
        idmsg := Aidmsg;
        FreeOnTerminate := True;
        inherited Create(False);
     End;
    procedure ThreadSendMail.Execute;
    begin
      { Place thread code here }
    Try
      //while not Terminated do  Synchronize
           Synchronize(ReadySendMail);
     except
      on e:Exception do
      Begin
        WriteErrorToTxt(Now,'ThreadSendMail.Execute',e.Message);
      End;
    End;
    end;
     Procedure ThreadSendMail.ReadySendMail;
     Begin
     Try
          Idsend.Send(idmsg);
          Application.ProcessMessages;    if Terminated then Exit; except
     on e:Exception do
        WriteErrorToTxt(Now,'ThreadSendMail.ReadySendMail',e.Message);
     End;
     End;
    红色地方,报错,我记录日志
    Socket Error # 10053
    Software caused connection abort.
    或者
    Socket Error # 10054
    Connection reset by peer
      

  3.   

    用outlook或foxmail试一下能不能收到
    发件服务器的附件大小有没控制
      

  4.   

    TO:Tjianliang
    OE,Foxmail是正常能发的, 
    附件是有控制,但没有到上限,对发送应该也不影响
      

  5.   

    Socket Error # 10053
    Software caused connection abort.
    或者
    Socket Error # 10054
    Connection reset by peer.这个错误是你的连接被服务器断开了,检查一下为什么断开。
      

  6.   

    TO:SQLDebug_Fan,我知道是被断开了,但原因我不知道怎么找,像4M以上的邮件很容易发生这事情,发2M以下左右都没问题,我检查了一下邮件服务器 也不存在附件大小限制问题,
      

  7.   

    TO:SQLDebug_Fan
    像QQ,Gmail都没有空间大小限制的,附件大的,发到一半也会失败.出现10054,10053现在问题有点眉目了,可能是装了瑞星防火墙造成的,我在没装防火墙发送时正常的,
      

  8.   

    同时,我在瑞星设置SMTP,POP3端口25,110,都通过的
      

  9.   

    或者换ICS控件试试,据说比INDY稳定。
      

  10.   

    这个控件我已下载了,现在还没用,
    好像还自带多线程谢谢 SQLDebug_Fan
      

  11.   

    你用的是什么操作系统,window203对发送邮件大小好像有限制,需要配置下。