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

September 4, 2007

SendEmail: WSAEWOULDBLOCK The socket would block.

The error information (below) is what you would received if nothing was listening on the remote host:port. In this case, we are trying to connect to port 465 of, but because the SMTP server is not listening at that port, the connect request times out (i.e. the socket would block for more than the specified timeout).

You can see the difference using telnet at a DOS prompt. For example, type "telnet 465″ and press RETURN. You’ll get binary garbage back. The connection was established (i.e. the SMTP server is listening at that port), and it sends the binary data to initiate an SSL handshake. You can type anything and see that eventually the connection is dropped because you, the client, are not sending the appropriate responses to establish an SSL connection.

However… if you try this: "telnet 465″, you get no response and eventually the telnet times out and returns another DOS prompt. That’s because the SMTP server is not listening at that port…

<DllDate>Sep  4 2007</DllDate>
<Component>Visual C++ 6.0</Component>
<info>Connecting to SMTP server</info>
<error>socket is not ready for writing</error>
<error>Connect function failed.</error>
<SocketError>WSAEWOULDBLOCK The socket would block.</SocketError>
<error>Check to make sure the port is not blocked by a firewall.</error>
<error>Failed to connect to secure SMTP (1)</error>
<error>Failed to connect to SMTP server.</error>

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.