如何使用delivery method =“network”将电子邮件保存到某个位置

时间:2012-05-03 08:08:13

标签: c# asp.net .net email smtp

在我的网页配置中,我可以设置传送方式=网络,但它仍然保存在specifiedPickupDirectory中,或者我需要总是编写不同的应用程序吗?

<mailSettings>
    <smtp deliveryMethod="Network" from="">
        <network defaultCredentials="true" host="" password="" port="25" userName="" />
        <specifiedPickupDirectory pickupDirectoryLocation="C:\SentMail" />
    </smtp>
</mailSettings>

1 个答案:

答案 0 :(得分:3)

试试这个:

<mailSettings>
    <smtp deliveryMethod="Network">
        <network host="mail.mydomain.com" port="25" />
    </smtp>

    <!-- Use this setting for development

    <smtp deliveryMethod="SpecifiedPickupDirectory">
        <specifiedPickupDirectory pickupDirectoryLocation="C:\Temp" />
    </smtp> -->
</mailSettings>

here开始。

相关问题