0 votes
by (480 points)

Yahoo n Outlook doesn't support keywords.

Will iCloud and Rediff support Keywords ?

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (62.8k points)
selected by
 
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.

by (480 points)
I need to see the assigned keyword in the email headers .. how can i fetch that
by (134k 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.
by (480 points)
How to get only MessageID from MessageList without other headers
by (62.8k points)
The easiest way, how to get the MessageID header is to specify ImapListFields.Envelope parameter in desired method (GetMessageInfo or GetMessageList).
by (480 points)
Have any Working  Code to Maintain IMAP  IDLE  for Notification . Please Share
by (62.8k 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.
...