Ejemplo n.º 1
0
        public override WebMailMessageCollection LoadMessages(Folder fld)
        {
            WebMailMessageCollection returnColl = new WebMailMessageCollection();
            MailMessageCollection    messages;

            try
            {
                messages = _pop3Obj.DownloadEntireMessages();
            }
            catch (MailBeeException ex)
            {
                Log.WriteException(ex);
                throw new WebMailMailBeeException(ex);
            }
            if (messages != null)
            {
                foreach (MailMessage msg in messages)
                {
                    WebMailMessage webMsg = new WebMailMessage(_account);
                    webMsg.Init(msg, true, fld);
                    returnColl.Add(webMsg);
                }
            }
            return(returnColl);
        }
Ejemplo n.º 2
0
        public override WebMailMessageCollection LoadMessages(object[] messageIndexSet, Folder fld)
        {
            WebMailMessageCollection msgsColl = new WebMailMessageCollection();

            foreach (string uid in messageIndexSet)
            {
                int index = _pop3Obj.GetMessageIndexFromUid(uid);
                if (index > 0)
                {
                    try
                    {
                        WebMailMessage webMsg = new WebMailMessage(_account);
                        webMsg.Init(_pop3Obj.DownloadEntireMessage(index), true, fld);
                        msgsColl.Add(webMsg);
                    }
                    catch (MailBeeException ex)
                    {
                        Log.WriteException(ex);
                        throw new WebMailMailBeeException(ex);
                    }
                }
                else
                {
                    continue;
                }
            }
            return(msgsColl);
        }
Ejemplo n.º 3
0
        public override WebMailMessageCollection LoadMessageHeaders(object[] messageIndexSet, Folder fld)
        {
            WebMailMessageCollection msgsColl = new WebMailMessageCollection();

            foreach (object uid in messageIndexSet)
            {
                int index = _pop3Obj.GetMessageIndexFromUid(Convert.ToString(uid));
                if (index > 0)
                {
                    try
                    {
                        WebMailMessage webMsg = new WebMailMessage(_account);
                        webMsg.Init(_pop3Obj.DownloadMessageHeader(index), true, fld);
                        if (fld.SyncType == FolderSyncType.DirectMode)
                        {
                            webMsg.Seen = true;
                        }
                        msgsColl.Add(webMsg);
                    }
                    catch (MailBeeException ex)
                    {
                        Log.WriteException(ex);
                        throw new WebMailMailBeeException(ex);
                    }
                }
                else
                {
                    continue;
                }
            }
            return(msgsColl);
        }