推迟发送mailmessage

推迟发送mailmessage

本文介绍了推迟发送mailmessage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



使用Outlook.MailItem,您可以将DeferredDeliveryTime设置为在将来某个日期/时间发送。



有谁知道如何使用Net.Mail.Mailmessage这样做?



我希望可以使用MailMessage.Headers完成但无法在任何地方找到任何文件。



谢谢



我尝试过:



到处搜索,查看MSDN文档。

Hi All

Using Outlook.MailItem you can set a DeferredDeliveryTime to send at a certain date/time in the future.

Does anyone know how to do this using Net.Mail.Mailmessage?

I am hoping it can be done using the MailMessage.Headers but cant find any documentation on it anywhere.

Thanks

What I have tried:

Googled everywhere, looked at the MSDN documentation.

推荐答案

[]:

MAPI不执行延期交付;它是底层消息传递系统的一个选项,用于处理延迟传递。

MAPI does not perform the deferred delivery; it is an option of the underlying messaging system to handle deferred delivery.

您必须找出 Outlook 使用的消息传递系统,如果也使用它Net.Mail 的。但我想它只与 Outlook Exchange 有关: []。



[ ^ ]主要是为了提供信息。这些标准允许网关延迟具有此字段的邮件,但您不应该依赖它。



您可以在应用程序未终止时使用计时器在您的应用程序中实现它有排队的邮件。或者您可以使用调度程序启动应用程序,并让它检查要发送的邮件。

you would have to find out which "messaging system" is used by Outlook and if that is also used by Net.Mail. But I guess it is related to Outlook and Exchange only: So how does this ‘Deferred Delivery’ thing work? – You Had Me At EHLO…[^].

The RFC 4021: 2.1.65. Header Field: Deferred-Delivery[^] is mainly of informational purpose. The standards allow gateways to delay mails having this field but you should not rely on that.

You can implement it in your application using a timer when your application is not terminated while having queued mails. Or you can start your application using a scheduler and let it check for mails to be send.


这篇关于推迟发送mailmessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:51