How do I set the message priority (i.e. make it marked urgent / high priority in Outlook, etc.)?
I tried (where "mailMessage" is SendGrid.Helpers.Mail.Mail object):
mailMessage.Headers.Add("Priority", "Urgent");
mailMessage.Headers.Add("Importance", "high");
It throws an Object reference not set to instance of an object error.
If I remove these two lines of code, the implementation works fine (albeit, now just a normal priority message) and the message is sent and received.
I am using the version currently deployed through Nuget (7.0.2.0 / 2.0.4.0 / 1.3.1.0).
Figured it out, the following works...
mailMessage.AddHeader("Priority", "Urgent");
mailMessage.AddHeader("Importance", "high");
Thanks for sharing your solution @eat-sleep-code!
Thanks @eat-sleep-code . Had the same issue.
Most helpful comment
Thanks @eat-sleep-code . Had the same issue.