Mega Code Archive

 
Categories / Delphi / Examples
 

Email meaning of socket error 10061

Question: My application needs to send and receive emails. Sometimes I get a socket error 10061 - what does this mean? Answer: If you would get the error message all the times, then the explanation would be that either port 25 (needed for sending email using SMTP protocol) or port 110 (used to receive email using POP protocol) are blocked by a firewall or your router. Since you report that this error happens on occasion (probably only when sending emails out), it can be assumed that the destination mail server is not accepting a connection from you. Maybe you've sent too many emails within an interval and the remote mail server considers your software to send out spam. So you could Reduce the frequency of sending mails to this server Reduce the speed of sending mails to this server Reduce the amount of mails to this server Try again later Send mails through a relay server A few words about relay servers. There are 'open' relay servers that everyone can use. There is even a web site dedicated to keeping track of these open relay servers ( http://www.ordb.org/). The problem with these open relay servers is that they are used by spammers and sending emails through them is a guaranteed way to get rejected. If you visit their site, make sure that your domain is not on their list yet. If your domain is not brandmarked as an open relay and you are not sending high volumes in short time, then most likely the network problem is on the receiving end (the remote mail server).