Will iCloud and Rediff support IMAP Message Keywords ?

0 votes
asked May 30, 2016 by Sigamani (480 points)

Yahoo n Outlook doesn't support keywords.

Will iCloud and Rediff support Keywords ?

Applies to: Rebex Secure Mail

1 Answer

+1 vote
answered May 30, 2016 by Lukas Matyska (60,730 points)
selected May 31, 2016 by Sigamani
 
Best answer

We don't have a list of IMAP servers which supports keywords feature, sorry.

However, you can simply try it for any IMAP server by the SetMessageFlags and Search methods.

If you have at least one mail in the INBOX folder, you can do it simply like this:

var client = new Imap();
client.Connect(...);
client.Login(...);

client.SelectFolder("INBOX");

client.SetMessageFlags(1, ImapFlagAction.Add, ImapMessageFlags.Keywords, "Test-KW");

ImapMessageCollection list = client.Search(ImapSearchParameter.Keyword("Test-KW"));

Console.WriteLine(list.Count);

If the IMAP server supports keywords feature, the list collection would not be empty.

commented May 31, 2016 by Sigamani (480 points)
I need to see the assigned keyword in the email headers .. how can i fetch that
commented May 31, 2016 by Lukas Pokorny (126,910 points)
Keywords are a feature of IMAP protocol - they are not part of the message itself and don't appear in email headers. They are just IMAP metadata and can be retrieved using Imap object's GetMessageInfo method:
            ImapMessageInfo info = client.GetMessageInfo(id, ImapListFields.Flags);
            string[] keywords = info.GetKeywords();
(where 'id' is sequence number or unique ID of the message)
Alternatively, GetMessageList also retrieves them when ImapListFields.Flags flag has been specified.
commented May 31, 2016 by Sigamani (480 points)
How to get only MessageID from MessageList without other headers
commented May 31, 2016 by Lukas Matyska (60,730 points)
The easiest way, how to get the MessageID header is to specify ImapListFields.Envelope parameter in desired method (GetMessageInfo or GetMessageList).
commented Jun 3, 2016 by Sigamani (480 points)
Have any Working  Code to Maintain IMAP  IDLE  for Notification . Please Share
commented Jun 3, 2016 by Lukas Matyska (60,730 points)
Please visit the (Getting list of changes)[http://www.rebex.net/secure-mail.net/features/imap-folders.aspx#detecting-changes] for short example. Or look at the (ImapBrowser sample)[http://www.rebex.net/sample/imap-winform-client/] for working sample code.
...