Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Imap Folder Mailkit

Tags:

c#

mailkit

Im trying to add a top level folder using Mailkit so when I add the following labels I am able to group them under this folder.

The labels are:

  • mailkit/archive
  • mailkit/flagged

I want to create a folder called mailkit so gmail groups them but I cannot seem to find a way to do this currently. Is this possible, does anyone have an example?

like image 966
Jaybeecave Avatar asked Apr 12 '15 22:04

Jaybeecave


Video Answer


1 Answers

Here's an example of what you need to do:

var toplevel = client.GetFolder (client.PersonalNamespaces[0]);
var mailkit = toplevel.Create ("mailkit", false);
var archive = mailkit.Create ("archive", true);
var flagged = mailkit.Create ("flagged", true);

Hope that helps.

like image 99
jstedfast Avatar answered Sep 26 '22 00:09

jstedfast