If you're anything like me, at times you probably get a little overwhelmed by the amount
of email you need to process. To help you manage your mail, Microsoft Outlook offers
you the ability to flag messages with different status codes... the most common one being
"Follow up". But why should we have to set this flag ourselves?
For example, if you receive things like sales leads or error notifications via email,
wouldn't it make sense if they came to you already flagged for follow up? After all,
if we didn't need to follow up on them then why would we have written script to send
ourselves the email in the first place? Then once you handle the message you simply
clear the flag or flag the message as complete. This way you can easily see which
messages you've handled and which ones you still need to address.
Luckily, it's not difficult to set these status flags before you send an email message
and make this a reality.
Outlook manages these flags via the email message headers. Specifically one called
"X-Message-Flag". By simply assigning some text to this header, Outlook
will display the message as flagged and will display the text in the little banner
that appears when you view a flagged message. In testing, I was able to set the text
to anything I wanted, but it's probably best if you stick to Outlook's standard flag
In ASP.NET 2.0 the syntax to set this flag looks something like this: