Ejemplo n.º 1
0
        public void SendNotification()
        {
            if (DateTime.Today.Day != SEND_DAY)
            {
                return;
            }

            PolicyList           policyList = PolicyList.getInstance();
            IEnumerable <Policy> list       = policyList.GetPolicyEnds();

            if (list.Any())
            {
                Driver driversTo = GetDriverForSending();

                string mailText = CreateMail(list);

                EMail email = new EMail();

                email.SendNotification(driversTo, mailText);
            }
        }