每当我从asp.net发送电子邮件时,“失败发送邮件"就会出现.发生异常,如何纠正
问题描述:
每当我从asp.net发送电子邮件时,发生发送邮件失败"异常,该如何纠正它.
whenever i send email from asp.net,"failure sending mail" exception is occurred,how to rectify it
答
您已完成此操作吗?
Have you done this?
<configuration>
<!-- Add the email settings to the <system.net> element -->
<system.net>
<mailSettings>
<smtp>
<network
host="relayServerHostname"
port="portNumber"
userName="username"
password="password" />
</smtp>
</mailSettings>
</system.net>
<system.web>
...
</system.web>
</configuration>
请点击链接以获取更多详细信息:
在ASP.NET 2.0中发送电子邮件 [
Follow the links for more details:
Sending Email in ASP.NET 2.0 [^]