Use IMail.GetGenericPriority() method. It gets message priority by checking following headers in the specified order: Priority
, Importance
and X-Priority
:
IMail mail = ...
GenericPriority priority = mail.GetGenericPriority();
switch (priority)
{
case GenericPriority.Low:
break;
case GenericPriority.Normal:
break;
case GenericPriority.High:
break;
default:
throw new ArgumentOutOfRangeException();
}