예제 #1
0
        /// <summary>
        /// Raises event 'GetMessageStream'.
        /// </summary>
        /// <param name="session">Reference to POP3 session.</param>
        /// <param name="messageInfo">Message info what message stream to get.</param>
        /// <returns></returns>
        internal POP3_eArgs_GetMessageStream OnGetMessageStream(POP3_Session session, POP3_Message messageInfo)
        {
            POP3_eArgs_GetMessageStream eArgs = new POP3_eArgs_GetMessageStream(session, messageInfo);

            if (this.GetMessageStream != null)
            {
                this.GetMessageStream(this, eArgs);
            }
            return(eArgs);
        }
        private void POP3_Server_GetMessageStream(object sender,POP3_eArgs_GetMessageStream e)
        {
            try{
                EmailMessageItems eArgs = new EmailMessageItems(e.MessageInfo.ID,IMAP_MessageItems_enum.Message);
                m_pApi.GetMessageItems(e.Session.UserName,e.Session.UserName,"Inbox",eArgs);

                e.MessageExists = eArgs.MessageExists;
                if(eArgs.MessageStream != null){
                    e.MessageStream = eArgs.MessageStream;
                }
            }
            catch(Exception x){
                Error.DumpError(this.Name,x,new System.Diagnostics.StackTrace());
            }
        }