Add Imap Folder Mailkit

廉价感情. 提交于 2019-12-11 03:58:32

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/29595296/add-imap-folder-mailkit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!