PickupDirectoryFromIis、Sender 属性和 SMTP MAIL FROM 信封

发布于 2024-07-12 06:29:25 字数 455 浏览 4 评论 0原文

当您使用 System.Net.Mail 发送电子邮件时,您可以使用 MailMessage.Sender 属性设置 SMTP MAIL FROM 信封。

如果将 smtp 网络 deliveryMethod 属性设置为“网络”,则使用“发件人”值设置 MAIL FROM 信封。

如果将 smtp 网络 deliveryMethod 属性设置为“PickupDirectoryFromIis”,则 MAIL FROM 信封将使用 MailMessage.From 属性而不是 Sender 属性。

出于性能考虑,我需要将 PickupDirectoryFromIis 保留为我的 deliveryMethod

有什么建议如何保留 SMTP MAIL FROM 信封所需的值吗?

提前致谢。

When you send an email using System.Net.Mail you can set the SMTP MAIL FROM envelope by using the MailMessage.Sender Property.

If you set the smtp network deliveryMethod property to be "Network", the MAIL FROM envelope is set using the Sender value.

If you set the smtp network deliveryMethod property to be "PickupDirectoryFromIis", the MAIL FROM envelope uses the MailMessage.From property instead of the Sender one.

I need to keep PickupDirectoryFromIis as my deliveryMethod for performance concern.

Any suggestion how to keep the value I need for the SMTP MAIL FROM envelope?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一世旳自豪 2024-07-19 06:29:25

如果你使用:

  <smtp deliveryMethod="SpecifiedPickupDirectory" from="[email protected]">
    <specifiedPickupDirectory pickupDirectoryLocation="c:\Temp\Mail" />
  </smtp>

??

What about if you use:

  <smtp deliveryMethod="SpecifiedPickupDirectory" from="[email protected]">
    <specifiedPickupDirectory pickupDirectoryLocation="c:\Temp\Mail" />
  </smtp>

??

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文