Delphi + Indy: Connection closed gracefully

前端 未结 3 1004
傲寒
傲寒 2021-01-18 02:06

Using D7 + Indy 10 latest build.

My code is using TIdSMTP to send email. I keep getting \"Connection closed gracefully\" at some end-users, and the email is never s

3条回答
  •  被撕碎了的回忆
    2021-01-18 02:36

    In my experience, in case of AT&T server, it rejects an email address which is not @att.net address in the MAIL FROM. More info can be determined by logging the error using TIdLogEvent for these users that receive it, otherwise the error report is rather vague - if the disconnect (Connection closed gracefully) occurs right after the MAIL FROM then it might indicate a server policy rejecting an email with the domain which it doesn't host as explained by Toni as well.

    Otherwise the "Connection closed gracefully" error means that an attempt is being made to read/write to socket that has been closed by the peer intentionally - in your case, peer is the SMTP server you connect to. It is different than the "Connection reset" error which indicates a broken connection. In both cases, the connection is no longer present and you can't read/write anymore to it.

提交回复
热议问题