Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

October 25, 2005

SMTP, firewalls, anti-virus, anti-spyware, etc.

If your program cannot connect to an SMTP server, you may see something like this in the MailMan.LastErrorText property:

Connecting to SMTP server :
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 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.

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.