private void QueueEmail(User user, string subject, string message)
        {
            var mailToSend = new MailToSend
            {
                UserId = user.Id,
                EmailTo = user.Email,
                EmailFrom = "*****@*****.**",
                Subject = subject,
                Content = message,
                CreationTime = DomainTime.Current.Now
            };

            _currentMailsToSend[mailToSend.UserId] = mailToSend;
            _notificationQueue.QueueMail(mailToSend);
        }
Пример #2
0
 public void SendMail(MailToSend mail)
 {
     // create smtp client
     // prepare mail
     // send it
 }
 public void QueueMail(MailToSend mailToSend)
 {
     _context.MailsToSend.Add(mailToSend);
 }