public AutoResponderService() { InitializeComponent(); _log = new SafeLog(); _cfg = new Conf(_log); _cfg.Init(); if (!EventLog.SourceExists("AutoResponderServiceSource")) { EventLog.CreateEventSource("AutoResponderServiceSource", "AutoResponderServiceLog"); } _eventLog.Source = "AutoResponderServiceSource"; _eventLog.Log = "AutoResponderServiceLog"; string[] mails = _cfg.AutoResponderMails.Split(' '); string[] passwords = _cfg.AutoResponderPasswords.Split(' '); if (mails.Length != passwords.Length) { _eventLog.WriteEntry("Wrong emails passwords count", EventLogEntryType.Error); return; } for (int i = 0; i < mails.Length; i++) { ImapIdler ImapIdler; try { ImapIdler = new ImapIdler(mails[i], passwords[i], _eventLog); } catch (Exception) { continue; } _imapIdlerList.Add(ImapIdler); } }
public void TestConfBase() { _cfg = new Conf(_log); _cfg.Init(); }
public void Init() { _cfg = new Conf(_log); _cfg.Init(); }