我可以将电子邮件标记为“高重要性"吗?Outlook 使用 System.Net.Mail? [英] Can I mark an Email as "High Importance" for Outlook using System.Net.Mail?

查看:30
本文介绍了我可以将电子邮件标记为“高重要性"吗?Outlook 使用 System.Net.Mail?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的客户处理的部分应用程序涉及为事件发送电子邮件.有时这些是非常重要的.我的客户以及我客户的大多数客户都使用 Outlook,它能够将邮件标记为高重要性.

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.

现在,我知道假设所有最终用户都将使用相同的界面是无情的,但我不是.但考虑到即使目标不一定通过 Outlook 阅读,您也可以从 Outlook 发送高重要性电子邮件,这意味着基本上存储了一些数据,不知何故,让 Outlook 知道特定邮件是否被分配为高重要性.至少这是我的解释.

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.

应用程序当前使用 System.Net.Mail 发送电子邮件,使用 System.Net.Mail.MailMessages 编写它们,System.Net.Mail.SmtpClient 发送它们.是否可以使用 System.Net.Mail 的功能来设置此高重要性"设置?如果没有,是否有任何可用的程序集可以配置此设置?

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?

推荐答案

设置邮件消息的优先级属性.其值为正常"、低"或高".

Set the Priority property of the mail message. Its values are Normal, Low or High.

非常晚的 正如@StefanSteiger 所指出的,Priority 仅保证适用于 Outlook.自发布此问题/答案以来的 8 年间,业界已将重要性标题作为首选方式.

Very late edit: 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.

甚至后来MailMessage 的来源 清楚地表明设置优先级实际上设置了三件事:XPriority 标头、优先级标头、和重要性标头.因此,使用 Priority 属性将在任何邮件客户端中按预期运行,并将设置适当的标头.

Even later edit: 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.

这篇关于我可以将电子邮件标记为“高重要性"吗?Outlook 使用 System.Net.Mail?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆