Пример #1
0
        /// <summary>
        /// Raises <b>Expunge</b> event.
        /// </summary>
        /// <param name="msgInfo">Messgae info.</param>
        /// <param name="response">Default IMAP server response.</param>
        /// <returns>Returns event args.</returns>
        private IMAP_e_Expunge OnExpunge(IMAP_MessageInfo msgInfo,IMAP_r_ServerStatus response)
        {
            IMAP_e_Expunge eArgs = new IMAP_e_Expunge(m_pSelectedFolder.Folder,msgInfo,response);
            if(this.Expunge != null){
                this.Expunge(this,eArgs);
            }

            return eArgs;
        }
Пример #2
0
 private void m_pImapServer_Session_Expunge(object sender,IMAP_e_Expunge e)
 {
     try{
         IMAP_Session ses = (IMAP_Session)sender;
                       
         m_pApi.DeleteMessage(
             ses.AuthenticatedUserIdentity.Name,
             ses.AuthenticatedUserIdentity.Name,
             ses.SelectedFolderName,
             e.MessageInfo.ID,
             (int)e.MessageInfo.UID
         );
     }
     catch(Exception x){
         e.Response = new IMAP_r_ServerStatus(e.Response.CommandTag,"NO","Error: " + x.Message);
     }
 }