示例#1
0
        public static MailQueue Push(MailQueue mail)
        {
            using(var db = ObjectProvider.CreateDB())
            {
                db.MailQueues.Add(mail);
                db.SaveChanges();

                return mail;
            }
        }
        public void SendMessage(MailMessage message)
        {
            var mail = new MailQueue()
            {
                From = message.From.Address,
                To = message.To[0].Address,
                Subject = message.Subject,
                Content = message.Body
            };

            MailQueue.Push(mail);
        }
示例#3
0
        public void SendMessage(MailMessage message)
        {
            var mail = new MailQueue()
            {
                From    = message.From.Address,
                To      = message.To[0].Address,
                Subject = message.Subject,
                Content = message.Body
            };

            _unitOfWork.MailQueues.Add(mail);
            _unitOfWork.Complete();
        }
示例#4
0
        public void SendMessage(MailMessage message)
        {
            var mail = new MailQueue()
            {
                From = message.From.Address,
                To = message.To[0].Address,
                Subject = message.Subject,
                Content = message.Body
            };

            _unitOfWork.MailQueues.Add(mail);
            _unitOfWork.Complete();
        }
示例#5
0
 public void Add(MailQueue mailQueue)
 {
     _raisinsDb.MailQueues.Add(mailQueue);
 }