I have a password recovery control that is set up to ask the user their security question. I have configured the from email and subject, but I am receiving a runtime error stating SMTP host is not specified.
我有一个密码恢复控件,设置为询问用户他们的安全问题。我已经配置了来自电子邮件和主题,但我收到一个运行时错误,说明未指定SMTP主机。
Can someone tell me where I need to set the host?
有人能告诉我在哪里设置主机吗?
Thanks
1 个解决方案
#1
Add a system.net section to your web.config with the following:
使用以下命令将system.net部分添加到web.config:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="yourmailserveraddress"/>
</smtp>
</mailSettings>
</system.net>
#1
Add a system.net section to your web.config with the following:
使用以下命令将system.net部分添加到web.config:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="yourmailserveraddress"/>
</smtp>
</mailSettings>
</system.net>