Exemplo n.º 1
0
        /// <summary>
        /// Raises event 'RenameMailbox'.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="mailbox">Mailbox which to rename.</param>
        /// <param name="newMailboxName">New mailbox name.</param>
        /// <returns></returns>
        internal string OnRenameMailbox(IMAP_Session session, string mailbox, string newMailboxName)
        {
            if (RenameFolder != null)
            {
                Mailbox_EventArgs eArgs = new Mailbox_EventArgs(mailbox, newMailboxName);
                RenameFolder(session, eArgs);

                return(eArgs.ErrorText);
            }

            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Raises event 'DeleteMailbox'.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="mailbox">Mailbox which to delete.</param>
        /// <returns></returns>
        internal string OnDeleteMailbox(IMAP_Session session, string mailbox)
        {
            if (DeleteFolder != null)
            {
                Mailbox_EventArgs eArgs = new Mailbox_EventArgs(mailbox);
                DeleteFolder(session, eArgs);

                return(eArgs.ErrorText);
            }

            return(null);
        }