예제 #1
0
        private async Task OnTimeoutAsync(Object source, string smtpServer, IEnumerable <MailMessage> mailMessages, DateTime scheduledSendDateTime)
        {
            if (scheduledSendDateTime.ToShortTimeString() == DateTime.Now.ToShortTimeString())
            {
                await SendEmailNow(smtpServer, mailMessages, true);

                var sendedEmail = _messageRepository.GetAll().Where(x => x.ScheduledSendDateTime == scheduledSendDateTime).FirstOrDefault().ToDomain();
                sendedEmail.SendDateTime          = DateTime.Now;
                sendedEmail.ScheduledSendDateTime = null;
                _messageRepository.Save(sendedEmail.ToEntity());
                messageSend.Invoke();
            }
        }
예제 #2
0
 public int Edit(Sender sender)
 {
     return(_repository.Save(sender.ToEntity()));
 }
예제 #3
0
 public int Edit(Host host)
 {
     return(_repository.Save(host.ToEntity()));
 }
예제 #4
0
 public int Edit(Recipient recipient)
 {
     return(_repository.Save(recipient.ToEntity()));
 }