If your program cannot connect to an SMTP server, you may see something like this in the MailMan.LastErrorText property:
SendEmail:
SMTP_Connect:
Connecting to SMTP server :
smtp_host:
smtp_port:
smtp_user:
socket is not ready for writing
Connection attempt timed out, trying again.
socket is not ready for writing
SocketError: WSAEWOULDBLOCK The socket would block.
Connect function failed.
SocketError: Unknown socket error
Failed to connect (1) Failed to connect to SMTP server.
This can happen when a firewall is blocking inbound or outbound access to the remote SMTP server port. For example, if you use Earthlink as your ISP, you cannot connect to an SMTP server on port 25 that is outside the Earthlink firewall. You can verify by starting a DOS prompt and then typing:
telnet smtp.somedomain.net 25
You will notice a delay and then an error message indicating a failure to connect. Testing with telnet is a quick way verify the connectivity with a remote SMTP server.
Sometimes the connection is blocked by anti-virus/anti-spyware port filtering. These programs watch outbound connections and block connections to senstive ports (such as the SMTP port) by unrecognized programs. This can solve the riddle of why Outlook can connect to the SMTP server, but your program cannot. In this case, the anti-spyware program usually provides customization features that allow you to specify programs that are allowed to make connections to these ports.