Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sending email to 365 server
#4
(04-22-2020, 11:07 PM)zsleo Wrote: On which line of code does the error happen on?
[ZSL] error at "idSMTP1.Connect;"

What does the call stack look like when the error happens?
[ZSL] Callstack:
main thread ($30ac):
0068b8cb +073 Prj2.exe    IdStack                        929  +54 TIdStack.RaiseSocketError
0068b852 +016 Prj2.exe    IdStack                        852  +1 TIdStack.RaiseLastSocketError
0068b7bd +015 Prj2.exe    IdStack                        826  +2 TIdStack.CheckForSocketError
006879b4 +0b0 Prj2.exe    IdStackWindows                2026  +20 TIdStackWindows.Connect
<snip>

That trace means that Indy is attempting a direct TCP connection to the specified Host/Port, so a timeout on that operation at the OS layer means that either:
  • you don't have a viable network router to that Host (or to a DNS server that can resolve that Host name to an IP). Can you ping the server?
  • you are not actually connecting to the correct Host/Port to begin with (which goes back to my suggestion to verify that with a sniffer).
  • the TCP handshake is getting lost and not being completed (which a sniffer will also see).

(04-22-2020, 11:07 PM)zsleo Wrote: How long does it take to time out?  TIdSSLIOHandlerSocketOpenSSL does use a 30 second timeout on Windows Vista+ if its ReadTimeout property is <= 0 (which it is by default).
[ZSL] after about 30 seconds

The timeout in question that TIdSSLIOHandlerSocketOpenSSL uses internally only applies after the TCP connection has been established and the SSL/TLS handshake is in progress. You are not even getting that far, there is no TCP connection being established.

Reply


Messages In This Thread
Sending email to 365 server - by zsleo - 04-22-2020, 06:43 AM
RE: Sending email to 365 server - by rlebeau - 04-22-2020, 05:50 PM
RE: Sending email to 365 server - by zsleo - 04-22-2020, 11:07 PM
RE: Sending email to 365 server - by rlebeau - 04-23-2020, 12:53 AM
RE: Sending email to 365 server - by zsleo - 04-24-2020, 04:21 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)