0 votes
by (160 points)

When saving an e-mail with Rebex.Secure.Mail the flag "X-Message-Flag: Follow up" is saved but not the flag status. When creating a copy of the saved mail, the status of the flag: Follow Up is no longer correct.
I have tried the mail formats .eml and .msg. With both mail formats the result is the same.
Is there a way to query and set the flag status?
Best Regards from Othmarsingen

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (62.8k points)

Please note that Rebex.Secure.Mail saves everything the IMAP server provides.
It means all headers, keywords, etc.

You did not specify what you mean by "the status of the flag: Follow Up is no longer correct". I suppose that you mean displaying the downloaded mail message in Microsoft Outlook.

Please note that the flag status in Microsoft Outlook/Exchange is stored in various MAPI (MSG format) properties, which are unrelated to MIME and those properties are not sent over the IMAP protocol.

To say it short: Unfortunately, there is no possibility to retrieve message flag status using IMAP protocol. Please use the EWS protocol instead. It can be retrieved like this:

// connect and login
var client = new Rebex.Net.Ews();
client.Connect("server", SslMode.Implicit);
client.Login("user", "password");

// get messages
var list = client.GetMessageList(EwsFolderId.Inbox, EwsItemFields.Full);

// print flag statuses
foreach (var item in list)