Esempio n. 1
0
        public void SendPendingEmails()
        {
            if (!ExistPendingEmails())
            {
                _logger.LogInformation("There are no pending emails");
                return;
            }

            var emailsToSend = GetEmailsToSend();

            _senderService.SendEmails(emailsToSend);

            _logger.LogInformation("Sent emails count: {0}", emailsToSend.Where(e => e.Status == eEmailStatus.Sent).Count());
        }