Categories
VB.NET

Error: Failure sending mail … Unable to connect to the remote server

During my development, I bound into this error. The short error message is “Failure sending mail”. The long one is

Failure sending mail. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

I googled a bit and found out that this is could be due to my SMTP services was not started. So, I went to start it but I got another message “Could not start the Simple Mail Transfer Protocol (SMTP) service on Local Computer. Error 1068: The dependency Service or group failed to start”.

So, I googled again and found out that this could be due to my IIS services was not started and so I went to start it. And guess what, there was still another error. I didn’t manage to save the error message this time.

Without giving up, I googled again and got tips to check on Event Log to see if there is any thing I can get from there. When I opened it, I saw nothing. Then, I went back to Window Services and found out that Event Log was disabled! I enabled it back, that is it. After that, I can start IIS services and SMTP services liao.

Wait a minute … as I continued with my development, I got another message, “Unable to send to all recipients”. This is will be shared in the next post.

One reply on “Error: Failure sending mail … Unable to connect to the remote server”

Leave a Reply

Your email address will not be published. Required fields are marked *

*