Esempio n. 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);
            }
        }
Esempio n. 2
0
 public override string ToString()
 {
     return($"{SendDate.ToShortDateString()} {SendDate.ToShortTimeString()} || {Subject} || From {SenderId}");
 }