Exemplo n.º 1
0
        /// <summary>
        /// Raises <b>Rename</b> event.
        /// </summary>
        /// <param name="cmdTag">Command tag.</param>
        /// <param name="currentFolder">Current folder name with optional path.</param>
        /// <param name="newFolder">New folder name with optional path.</param>
        /// <returns>Returns event args.</returns>
        private IMAP_e_Rename OnRename(string cmdTag,string currentFolder,string newFolder)
        {
            IMAP_e_Rename eArgs = new IMAP_e_Rename(cmdTag,currentFolder,newFolder);
            if(this.Rename != null){
                this.Rename(this,eArgs);
            }

            return eArgs;
        }
Exemplo n.º 2
0
        private void m_pImapServer_Session_Rename(object sender,IMAP_e_Rename e)
        {
            try{
				IMAP_Session ses = (IMAP_Session)sender;

				m_pApi.RenameFolder(ses.AuthenticatedUserIdentity.Name,ses.AuthenticatedUserIdentity.Name,e.CurrentFolder,e.NewFolder);

                e.Response = new IMAP_r_ServerStatus(e.CmdTag,"OK","RENAME command completed.");
			}
			catch(Exception x){
				e.Response = new IMAP_r_ServerStatus(e.Response.CommandTag,"NO","Error: " + x.Message);
			}
        }