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 smtp.chilkatsoft.com, 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 smtp.gmail.com 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 smtp.chilkatsoft.com 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…

<ChilkatLog>
<SendEmail>
<DllDate>Sep  4 2007</DllDate>
<Username>Matt</Username>
<Component>Visual C++ 6.0</Component>
<SMTP_Connect>
<info>Connecting to SMTP server smtp.virginiayachts.com:465</info>
<smtp_host>smtp.chilkatsoft.com</smtp_host>
<smtp_port>465</smtp_port>
<smtp_user>something@chilkatsoft.com</smtp_user>
<trying-auth-method>LOGIN</trying-auth-method>
<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>
</SMTP_Connect>
<error>Failed to connect to SMTP server.</error>
</SendEmail>
</ChilkatLog>


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

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