Written by

Manager, Application Services at InterSystems
Question Ben Spead · Sep 8, 2021

How to set High Priority on a %Net.MailMessage object?

Does anyone know how to set an email as High priority when it is sent using a %Net.MailMessage object?  Somehow I can't seem to put my finger on it.

Thanks!

Comments

Chris Stewart · Sep 8, 2021

HI Ben, 


I believe this is implemented specifically on each mail server and client, so there is no standard for it: See https://www.chilkatsoft.com/p/p_471.asp for details

You can set these headers, but there's no guarantee the client or receiving server will take note of them

HTH

Chris

0
Ben Spead  Sep 8, 2021 to Chris Stewart

Thanks Chris!  Interesting article and it got me what I needed  :)  I ended up writing and testing the same thing as Muhammad posted for an answer and it works for Outlook (which is good enough for me for now)

Thanks again!

0
Muhammad Waseem · Sep 8, 2021

Hi Ben Spead,

You can set priority by adding additional headers such as X-Priority and others. e.g:
 

 do msg.Headers.SetAt(1,"X-Priority")
 do msg.Headers.SetAt("High","X-MSMail-Priority")
 do msg.Headers.SetAt("High","Importance")

Thanks

0