/// <summary>
        /// Raises <b>MyRights</b> event.
        /// </summary>
        /// <param name="folder">Folder name with optional path.</param>
        /// <param name="response">Default IMAP server response.</param>
        /// <returns>Returns event args.</returns>
        private IMAP_e_MyRights OnMyRights(string folder,IMAP_r_ServerStatus response)
        {
            IMAP_e_MyRights eArgs = new IMAP_e_MyRights(folder,response);
            if(this.MyRights != null){
                this.MyRights(this,eArgs);
            }

            return eArgs;
        }
Exemple #2
0
        private void m_pImapServer_Session_MyRights(object sender,IMAP_e_MyRights e)
        {
            try{
                IMAP_Session ses = (IMAP_Session)sender;

                e.MyRightsResponse = new IMAP_r_u_MyRights(
                    e.Folder,
                    IMAP_Utils.ACL_to_String(m_pApi.GetUserACL(ses.AuthenticatedUserIdentity.Name,e.Folder,ses.AuthenticatedUserIdentity.Name))
                );
            }
            catch(Exception x){
                e.Response = new IMAP_r_ServerStatus(e.Response.CommandTag,"NO","Error: " + x.Message);
            }
        }