1/09/2017

.Net Send Email Problem - net_io_connectionclosed

最近在 migrate 舊的 .net 程式到 Windows Server 上, 其中有一個 SMTP 的 Setting 造成 Email Send 不出去, 得到下列的 Error Message.

System.Net.Mail.SmtpException: net_io_connectionclosed

Program 是 .Net 2.0, Server 是 Windows

Server 2008 在這篇文章中找到 Solution.

I ran into this today and the solution is tied somehow to the IP addresses you are using to secure the SMTP virtual server.  My server has multiple IP addresses bound to the same adapter and the VS was configured to use one of them.  However, I had all of the access restrictions to allow connections only from 127.0.0.1 which is the source of the error (I believe.

So, whatever the IP address your VS is listening on OR the IP your application is configured to use, configure the following areas:
  • Access/Connection control/Only the list below/[add your server ip]
  • Access/Relay restrictions/Only the list below/[add your server ip]
  • Configure your application to utilized the server ip, not localhost or 127.0.0.1