public void StartBirthdayService()
        {
            string cc       = ConfigurationManager.GetValue("bdaymailCC");
            string subject  = ConfigurationManager.GetValue("bdaymailSubject");
            int    noOfPics = int.Parse(ConfigurationManager.GetValue("noofpics"));
            string pic      = new Random().Next(noOfPics + 1).ToString();
            var    bdMsgs   = _msBuidler.GetBDayMessages(pic, BirthdayType.Todays);

            foreach (KeyValuePair <string, string> bdMsg in bdMsgs)
            {
                MailManager.SendMail(bdMsg.Key, cc, subject, bdMsg.Value, Path.GetFullPath(".\\resources\\pics\\" + pic + ".jpg"));
            }
        }
 public void StartAdvancedBirthdaysService()
 {
     try
     {
         string cc       = ConfigurationManager.GetValue("bdaymailCC");
         string subject  = ConfigurationManager.GetValue("advancebdaymailSubject");
         int    noOfPics = int.Parse(ConfigurationManager.GetValue("noofadvancedpics"));
         string pic      = new Random().Next(noOfPics + 1).ToString();
         var    bdMsgs   = _msBuidler.GetBDayMessages(pic, BirthdayType.Advanced);
         foreach (KeyValuePair <string, string> bdMsg in bdMsgs)
         {
             MailManager.SendMail(bdMsg.Key, cc, subject, bdMsg.Value, Path.GetFullPath(".\\resources\\pics\\advanced\\" + pic + ".jpg"));
         }
     }
     catch (Exception ex)
     {
         Logger.WriteException(ex);
     }
 }
        public void StartBirthdayReminderService()
        {
            try
            {
                string message = _msBuidler.GetMessage();

                if (!String.IsNullOrWhiteSpace(message))
                {
                    string to      = ConfigurationManager.GetValue("remindermailTo");
                    string subject = ConfigurationManager.GetValue("remindermailSubject");
                    string cc      = ConfigurationManager.GetValue("remindermailCC");
                    MailManager.SendMail(to, cc, subject, message);
                }
            }
            catch (Exception ex)
            {
                Logger.WriteException(ex);
            }
        }