/// <summary>sends LIST command</summary> /// <remarks> /// valid in authenticated state /// This method sends LIST command with an empty mailbox name. /// </remarks> public ImapCommandResult ListRoot(string referenceName, out ImapMailboxList root) { RejectNonAuthenticatedState(); if (referenceName == null) throw new ArgumentNullException("referenceName"); root = null; using (var t = new ListTransaction(connection)) { t.RequestArguments["reference name"] = new ImapQuotedString(referenceName); t.RequestArguments["mailbox name"] = new ImapQuotedString(string.Empty); if (ProcessTransaction(t).Succeeded) { hierarchyDelimiters[referenceName] = t.Result.Value[0].HierarchyDelimiter; root = t.Result.Value[0]; } return t.Result; } }
public ImapMailbox GetExistOrCreate(ImapMailboxList mailboxList) { var mailbox = GetExistOrCreate(mailboxList.Name); mailbox.Flags = mailboxList.NameAttributes; mailbox.HierarchyDelimiter = mailboxList.HierarchyDelimiter; return mailbox; }
/// <summary>sends LIST command</summary> /// <remarks> /// valid in authenticated state /// This method sends LIST command with an empty mailbox name and an empty reference name. /// </remarks> public ImapCommandResult ListRoot(out ImapMailboxList root) { return ListRoot(string.Empty, out root); }