EIdSMTPReplyErroroccurs in response to an error message from the SMTP server at the SMTP protocol level. 11004- Socket / DNS error, not SMTP error. There would be no additional error information other than the main OS error message (which you can get from SysErrorMessage()):
The requested name is valid and was found in the database, but it does not have the correct associated data that is allowed for.
As for TIdSMTP.Send(), you can look for exceptions EIdSMTPReplyError, for example:
try
IdSMTP1.Connect;
try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
except
on E: EIdSMTPReplyError do
Application.MessageBox(
PChar(
'Error message: ' + E.Message + sLineBreak +
'Error code: ' + IntToStr(E.ErrorCode) + sLineBreak +
'Error reply: ' + E.EnhancedCode.ReplyAsStr
),
'SMTP Error...', MB_OK + MB_ICONSTOP + MB_TOPMOST);
end;
, , . , , , / SMTP .
SSL/TLS, , , TIdSMTP:
1) EIdSocketError, , 11004.
2) EIdSMTPReplyError , , SSL/TLS, TIdSMTP.UseTLS, utUseImplicitTLS.
2) EIdOSSLConnectError , OpenSSL, UseTLS=utUseImplicitTLS, SSL/TLS.
3) UseTLS, utUseExplicitTLS utRequiresTLS, TLS, - SSL/TLS - TIdSMTP.OnTLSHandShakeFailed, utUseExplicitTLS. VContinue=True, utRequiresTLS, EIdTLSClientTLSHandShakeFailed.
4) UseTLS utUseExplicitTLS utRequiresTLS, TLS, TIdSMTP.OnTLSNotAvailable, utUseExplicitTLS. VContinue=True, utRequiresTLS, EIdTLSClientTLSNotAvailable.