在做发邮件功能的时候,出现这么个错误 如下:
The remote name could not be resolved: 'smtp.163.com'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote name could not be resolved: 'smtp.163.com'
Web.config 里的配置节点为:
<add key="PostAddress" value=test@163.com/>
<add key="PostName" value="test"/>
<add key="PostPassword" value="111111"/>
<add key="PostService" value="'smtp.163.com'"/>
我是把参数都写到了web.config里。
解决办法 把 'smtp.163.com' 改成 对应的服务器地址就可以了。