コード例 #1
0
        public void Execute(IJobExecutionContext context)
        {
            Log.Info("QUARTZ: Scheduled Job started");

            var mailBoxArgs = new MailBoxReaderArgs
            {
                Server = HostSettingManager.Get(HostSettingNames.Pop3Server),
                Port = Convert.ToInt32(HostSettingManager.Get(HostSettingNames.Pop3Port)),
                UseSSL = Boolean.Parse(HostSettingManager.Get(HostSettingNames.Pop3UseSSL)),
                Username = HostSettingManager.Get(HostSettingNames.Pop3Username),
                Password = HostSettingManager.Get(HostSettingNames.Pop3Password),
                ProcessInlineAttachedPictures = Convert.ToBoolean(HostSettingManager.Get(HostSettingNames.Pop3InlineAttachedPictures)),
                BodyTemplate = HostSettingManager.Get(HostSettingNames.Pop3BodyTemplate),
                DeleteAllMessages = Convert.ToBoolean(HostSettingManager.Get(HostSettingNames.Pop3DeleteAllMessages)),
                ReportingUserName = HostSettingManager.Get(HostSettingNames.Pop3ReportingUsername),
                ProcessAttachments = Convert.ToBoolean(HostSettingManager.Get(HostSettingNames.Pop3ProcessAttachments))
            };

            var mailboxReader = new MailboxReader(mailBoxArgs);
            mailboxReader.ReadMail();
        }
コード例 #2
0
ファイル: MailBoxReaderJob.cs プロジェクト: KamilZet/BugNet
        public void Execute(IJobExecutionContext context)
        {
            Log.Info("QUARTZ: Scheduled Job started");

            var mailBoxArgs = new MailBoxReaderArgs
            {
                Server   = HostSettingManager.Get(HostSettingNames.Pop3Server),
                Port     = Convert.ToInt32(HostSettingManager.Get(HostSettingNames.Pop3Port)),
                UseSSL   = Boolean.Parse(HostSettingManager.Get(HostSettingNames.Pop3UseSSL)),
                Username = HostSettingManager.Get(HostSettingNames.Pop3Username),
                Password = HostSettingManager.Get(HostSettingNames.Pop3Password),
                ProcessInlineAttachedPictures = Convert.ToBoolean(HostSettingManager.Get(HostSettingNames.Pop3InlineAttachedPictures)),
                BodyTemplate       = HostSettingManager.Get(HostSettingNames.Pop3BodyTemplate),
                DeleteAllMessages  = Convert.ToBoolean(HostSettingManager.Get(HostSettingNames.Pop3DeleteAllMessages)),
                ReportingUserName  = HostSettingManager.Get(HostSettingNames.Pop3ReportingUsername),
                ProcessAttachments = Convert.ToBoolean(HostSettingManager.Get(HostSettingNames.Pop3ProcessAttachments))
            };

            var mailboxReader = new MailboxReader(mailBoxArgs);

            mailboxReader.ReadMail();
        }