ImapSelectFolder Method |
Namespace: MailBee.ImapMail
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
To select the folder for read-only access, the developer should use ExamineFolder(String) method.
The developer should specify the full name of the folder (including all parent folders' names if the folder is subfolder of another existing folder). See CreateFolder(String) topic for details regarding folder names.
using System; using MailBee; using MailBee.ImapMail; class Sample { static void Main(string[] args) { Imap imp = new Imap(); // Connect to the server and log in the account. imp.Connect("imap.company.com"); imp.Login("jdoe", "secret"); // Select the folder. imp.SelectFolder("Inbox"); imp.SetMessageFlags(Imap.AllMessages, false, SystemMessageFlags.Seen, MessageFlagAction.Add); imp.Disconnect(); } }