Click here to Skip to main content
15,667,355 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 20-Mar-18 2:16am

1 solution

According to
MAPI does not perform the deferred delivery; it is an option of the underlying messaging system to handle deferred delivery.
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900