<div style="text-indent: 2em; font-size: larger;">

在.NET中实现发送邮件功能,需要在web.config中作好配置,配置项位于<configuration>节点之间。如:

<?xml version="1.0"?>
<configuration>
    ...
    <system.net>
        <mailSettings>
            <smtp deliveryMethod="Network" from="someone<someone@myfootprints.cn>">
                <network host="smtp.qq.com" userName="***@myfootprints.cn" password="***"/>
            </smtp>
        </mailSettings>
    </system.net>
</configuration>