Hello, Is it possible to get more information during the sending process? I have a customer who seems to have a firewall blocking communication. But I don't get an error message, instead the process hangs on "llResult = loSmtp.Sendmail()". My code currently is:
llResult = loSmtp.Sendmail()
IF llResult
WAIT WINDOW "Mail sent..." nowait
ELSE
? "Mail sending failed: "
? loSmtp.cErrorMsg
WAIT "Fehler" WINDOW TIMEOUT 5
ENDIF
Thanks and greetings from Berlin Ralph von Loesch
Unfortunately that's the way the Windows Socket APIs work - if there's something listening but not responding, there's no timeout for that, so the connection just hangs. There are other timeouts but they only apply once a connection has been established. If a connection hangs like this you can assume that it's either being rejected or the server purposefully is not returning a response (as is often the case for proxies to avoid hack attempts).
Either way you likely have the wrong settings for IP or port or Proxy configuration. Note that (.NET - mode=0) SMTP doesn't pick up automatic proxy settings from Windows - proxies have to either be set explicitly or via configuration file (yourapp.exe.config) to enable automatic proxy detection.
+++ Rick ---