예제 #1
0
        public void Logout(GXPOP3Session session)
        {
            try
            {
                Logout();
            }
            catch (GXMailException exc)
            {
#if DEBUG
                GXLogging.Error(log, "Logout error", exc);
#endif
                session.HandleMailException(exc);
            }
        }
예제 #2
0
        public void Delete(GXPOP3Session session)
        {
            try
            {
                Delete();
            }
            catch (GXMailException exc)
            {
#if DEBUG
                GXLogging.Error(log, "Delete error", exc);
#endif
                session.HandleMailException(exc);
            }
        }
예제 #3
0
        public void Login(GXPOP3Session session)
        {
            secureConnection = (session.Secure == 1);
            newMessages      = (session.NewMessages == 1);

            try
            {
                ConnectAndLogin();
            }
            catch (GXMailException exc)
            {
#if DEBUG
                GXLogging.Error(log, "Login error", exc);
#endif
                session.HandleMailException(exc);
            }
        }
예제 #4
0
        public void Skip(GXPOP3Session session)
        {
            try
            {
                Skip();
            }
            catch (NoMessagesException exc)
            {
#if DEBUG
                GXLogging.Debug(log, "Receive error", exc);
#endif
                session.HandleMailException(exc);
            }
            catch (GXMailException exc)
            {
#if DEBUG
                GXLogging.Error(log, "Skip error", exc);
#endif
                session.HandleMailException(exc);
            }
        }
예제 #5
0
        public void Receive(GXPOP3Session session, GXMailMessage msg)
        {
            try
            {
                Receive(msg);
            }
            catch (NoMessagesException exc)
            {
#if DEBUG
                GXLogging.Debug(log, "Receive error", exc);
#endif
                session.HandleMailException(exc);
            }
            catch (GXMailException exc)
            {
#if DEBUG
                GXLogging.Error(log, "Receive error", exc);
#endif
                session.HandleMailException(exc);
            }
        }
예제 #6
0
        public string GetNextUID(GXPOP3Session session)
        {
            string nextUID = string.Empty;

            try
            {
                GetNextUID(ref nextUID);
            }
            catch (NoMessagesException exc)
            {
#if DEBUG
                GXLogging.Debug(log, "Receive error", exc);
#endif
                session.HandleMailException(exc);
            }
            catch (GXMailException exc)
            {
#if DEBUG
                GXLogging.Error(log, "GetNextUID error", exc);
#endif
                session.HandleMailException(exc);
            }
            return(nextUID);
        }