Email Priority

In the new System.Net.Mail.MailMessage object, I do not see a way to set a message's priority. If I recall correctly, this was in the older model found under System.Web.Mail.MailMessage.

Any ideas as to how to a a MailMessage's priority? Thanks.

John

[256 byte] By [JohnWalker] at [2008-1-21]
# 1
Hi,

The older model had a property called Priority and an enumeration called MailPriority. This is not present on the newer MailMessage under the System.Net.Mail namespace and there is no other equivalent property exposed to set this.

Vikram

Vikram at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 2
Vikram,

Thanks for taking the time to respond. Do you have any idea behind the reasoning for this? Seems like an over-sight, but I imagine there must have been some reasoning that went into it's omission. Thanks again.

John

JohnWalker at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 3
John,

I agree that this is an oversight. As far as I know, the earlier namespace used COM Interop and was *NOT* a pure .NET implementation. Because of that they have deprecated it and introduced this new one which is supposed to be more performance efficient as its pure managed code.

That however really does not explain why this property was omitted. Maybe someone from Microsoft can throw more light on this?

Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 4
John,

This feature is on our radar and we are looking at adding it for the final relase of Whidbey. We will let you know more on this as soon as the plans are final.

mahjayar at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 5
Thank you for clarifying mahjayar!
JohnWalker at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...
# 6

Try this:

'assuming message is your MailMessage obj
message.Headers.Add("X-Priority", "1 (Highest)")


Possible values :

1 (Highest)
2 (High)
3 (Normal)
4 (Low)
5 (Lowest)

3 (Normal) is default if the field is omitted.

wilfridB

WilfridB at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...

.NET Development

Site Classified