예제 #1
0
        private async Task SendEmailShedullerAsync()
        {
            var messages = GetMessages();

            try
            {
                MyMessageQueue.Enqueue($"Письмо будет отправлено {SendDate.ToShortDateString()} в {SendTime.ToShortTimeString()}");
                await Task.Run(() => _mesageSendService.SendEmailScheduler(
                                   SmtpServer,
                                   messages,
                                   SendDate,
                                   SendTime));
            }
            catch (EmailSendServiceException ex)
            {
                MyMessageQueue.Enqueue(ex.Message);
            }
        }
예제 #2
0
 public override string ToString()
 {
     return($"{SendDate.ToShortDateString()} {SendDate.ToShortTimeString()} || {Subject} || From {SenderId}");
 }