Пример #1
0
        /// <summary>
        /// Raises event GetMessageItems.
        /// </summary>
        /// <param name="session">Reference to IMAP session.</param>
        /// <param name="messageInfo">Message info what message items to get.</param>
        /// <param name="messageItems">Specifies message items what must be filled.</param>
        /// <returns></returns>
        internal protected IMAP_eArgs_MessageItems OnGetMessageItems(IMAP_Session session, IMAP_Message messageInfo, IMAP_MessageItems_enum messageItems)
        {
            IMAP_eArgs_MessageItems eArgs = new IMAP_eArgs_MessageItems(session, messageInfo, messageItems);

            if (this.GetMessageItems != null)
            {
                this.GetMessageItems(session, eArgs);
            }
            return(eArgs);
        }
Пример #2
0
 /// <summary>
 /// Copies EmailMessageItems info to the specified IMAP_eArgs_MessageItems object.
 /// </summary>
 /// <param name="e"></param>
 public void CopyTo(IMAP_eArgs_MessageItems e)
 {
     if(this.BodyStructure != null){
         e.BodyStructure = this.BodyStructure;
     }
     if(this.Envelope != null){
         e.Envelope = this.Envelope;
     }
     if(this.Header != null){
         e.Header = this.Header;
     }
     e.MessageExists = this.MessageExists;            
     if(this.MessageStream != null){
         e.MessageStream = this.MessageStream;
     }
 }
        private void IMAP_Server_GetMessageItems(object sender,IMAP_eArgs_MessageItems e)
        {
            string userName   = e.Session.UserName;
            string folder     = e.Session.SelectedMailbox;

            EmailMessageItems eArgs = new EmailMessageItems(e.MessageInfo.ID,e.MessageItems);
            m_pApi.GetMessageItems(userName,userName,folder,eArgs);

            eArgs.CopyTo(e);
        }