private void SendMail(object state)
        {
            Console.WriteLine("Begin SendMailHostedService");

            var unsentEmails = _emailRepository.Get10UnsentEmails();

            Console.WriteLine($"There is {unsentEmails.Count} email to send");

            foreach (var unsentEmail in unsentEmails)
            {
                _sendMailService.Send(unsentEmail);

                unsentEmail.MarkEmailAsSent();
                _emailRepository.Save(unsentEmail);
            }

            Console.WriteLine("End SendMailHostedService");
        }