Exemplo n.º 1
0
        public void SingleCompanyInvoke()
        {
            if (!License.HelpDesk)
            {
                return;
            }

            // OZ: [2007-01-29] EMailMessageLog
            EmailLogSettings = EMailMessageLogSetting.Current;
            if (EmailLogSettings.IsActive)
            {
                EMailMessageLog.CleanUp(EmailLogSettings.Period);
            }
            else
            {
                EmailLogSettings = null;
            }
            //

            // Process External Box
            foreach (EMailRouterPop3Box pop3Box in EMailRouterPop3Box.ListExternal())
            {
                if (pop3Box.Activity.IsActive)
                {
                    EMailRouterPop3BoxMessageLoader loader = new EMailRouterPop3BoxMessageLoader(pop3Box);

                    loader.Error      += new ExceptionAbortEventHandler(OnMessageLoaderError);
                    loader.NewMessage += new EventHandler(OnNewMessage);


                    loader.ReceiveMessages();
                }
            }

            // Process Internal Box
            EMailRouterPop3Box internalPop3Box = EMailRouterPop3Box.ListInternal();

            if (internalPop3Box != null && internalPop3Box.Activity.IsActive)
            {
                EMailRouterPop3BoxMessageLoader loader = new EMailRouterPop3BoxMessageLoader(internalPop3Box);

                loader.Error      += new ExceptionAbortEventHandler(OnMessageLoaderError);
                loader.NewMessage += new EventHandler(OnNewMessage);

                loader.ReceiveMessages();
            }

            //Process send email from SMTP queue
            //try
            //{
            //    SmtpClientUtility.ProcessSendMessages();
            //}
            //catch (Exception)
            //{
            //    // TODO:
            //    //PortalConfig.SmtpSettings.IsChecked = false;
            //    throw;
            //}
        }
Exemplo n.º 2
0
 public static void Update(EMailMessageLogSetting Setting)
 {
     Setting._srcRow.Update();
 }
Exemplo n.º 3
0
        public void SingleCompanyInvoke()
        {
            if (!License.HelpDesk)
                return;

            // OZ: [2007-01-29] EMailMessageLog
            EmailLogSettings = EMailMessageLogSetting.Current;
            if (EmailLogSettings.IsActive)
                EMailMessageLog.CleanUp(EmailLogSettings.Period);
            else
                EmailLogSettings = null;
            //

            // Process External Box
            foreach (EMailRouterPop3Box pop3Box in EMailRouterPop3Box.ListExternal())
            {
                if (pop3Box.Activity.IsActive)
                {
                    EMailRouterPop3BoxMessageLoader loader = new EMailRouterPop3BoxMessageLoader(pop3Box);

                    loader.Error += new ExceptionAbortEventHandler(OnMessageLoaderError);
                    loader.NewMessage += new EventHandler(OnNewMessage);

                    loader.ReceiveMessages();
                }
            }

            // Process Internal Box
            EMailRouterPop3Box internalPop3Box = EMailRouterPop3Box.ListInternal();
            if (internalPop3Box != null && internalPop3Box.Activity.IsActive)
            {
                EMailRouterPop3BoxMessageLoader loader = new EMailRouterPop3BoxMessageLoader(internalPop3Box);

                loader.Error += new ExceptionAbortEventHandler(OnMessageLoaderError);
                loader.NewMessage += new EventHandler(OnNewMessage);

                loader.ReceiveMessages();
            }

            //Process send email from SMTP queue
            //try
            //{
            //    SmtpClientUtility.ProcessSendMessages();
            //}
            //catch (Exception)
            //{
            //    // TODO:
            //    //PortalConfig.SmtpSettings.IsChecked = false;
            //    throw;
            //}
        }
Exemplo n.º 4
0
 public static void Update(EMailMessageLogSetting Setting)
 {
     Setting._srcRow.Update();
 }