Example #1
0
        /// <summary>
        /// Raises <b>GetMessagesInfo</b> event.
        /// </summary>
        /// <returns>Returns event args.</returns>
        private POP3_e_GetMessagesInfo OnGetMessagesInfo()
        {
            POP3_e_GetMessagesInfo eArgs = new POP3_e_GetMessagesInfo();

            if(this.GetMessagesInfo != null){
                this.GetMessagesInfo(this,eArgs);
            }

            return eArgs;
        }
Example #2
0
        private void m_pPop3Server_Session_GetMessagesInfo(object sender,POP3_e_GetMessagesInfo e)
        {
            try{
				string userName = ((POP3_Session)sender).AuthenticatedUserIdentity.Name;

                List<IMAP_MessageInfo> messages = new List<IMAP_MessageInfo>();
                m_pApi.GetMessagesInfo(userName,userName,"Inbox",messages); 
                foreach(IMAP_MessageInfo msgInfo in messages){
                    e.Messages.Add(new POP3_ServerMessage(msgInfo.UID.ToString(),(int)msgInfo.Size,msgInfo.ID));
                }
			}
			catch(Exception x){
				Error.DumpError(this.Name,x,new System.Diagnostics.StackTrace());
			}
        }