Part of the application I'm working on for my client involves sending emails for events. Sometimes these are highly important. My client, and most of my client's clients, use Outlook, which has the ability to mark a mail message as High Importance.
Now, I know it is callous to assume that all end users will be using the same interface, sp I am not. But considering you can send email from Outlook as High Importance even if the target is not necessarily reading through Outlook, that means that there is basically some data stored, somehow, that lets Outlook know if a particular message was assigned as High Importance. That's my interpretation, at least.
The application currently uses System.Net.Mail
to send out emails, using System.Net.Mail.MailMessages
for writing them and System.Net.Mail.SmtpClient
to send them. Is it possible to set this "High Importance" setting with System.Net.Mail
's abilities? If not, is there any assembly available which can configure this setting?
Currently, There is no way to set the priority of an email in this client.
The 'high priority' sending option is designed to ensure that the recipient of the email knows that this is an important email before opening it and should therefore be prioritised. It may be that the email Page 2 contains urgent information that the recipient may need.
Set the Priority property of the mail message. Its values are Normal, Low or High.
As @StefanSteiger notes, Priority is only guaranteed to work for Outlook. In the intervening 8 years since this question/answer were posted, the industry has settled on the Importance header as the preferred way to do this.
The source for MailMessage makes it clear that setting the Priority actually sets three things: the XPriority header, the Priority header, and the Importance header. So using the Priority property will behave as expected in any mail client, and will set the appropriate headers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With