Example #1
0
        public override void Send(Message notice)
        {
            RazorEmailMessage razorEmailNotice = notice as RazorEmailMessage;

            razorEmailNotice.IsHtml  = true;
            razorEmailNotice.Content = _viewRenderService.Render(razorEmailNotice.TemplatePath, razorEmailNotice.Model);
            base.Send(razorEmailNotice as Message);
        }
Example #2
0
        public override void Send(Message notice)
        {
            RazorEmailMessage razorEmailNotice = notice as RazorEmailMessage;

            razorEmailNotice.IsHtml  = true;
            razorEmailNotice.Content = _viewRenderService.Render(razorEmailNotice.TemplatePath, razorEmailNotice.Model);
            EmailMessage emailMessage = new EmailMessage
            {
                Subject     = razorEmailNotice.Subject,
                From        = razorEmailNotice.From,
                To          = razorEmailNotice.To,
                Cc          = razorEmailNotice.Cc,
                Bcc         = razorEmailNotice.Bcc,
                Content     = razorEmailNotice.Content,
                Attachments = razorEmailNotice.Attachments,
                DisplayName = razorEmailNotice.DisplayName,
                IsHtml      = razorEmailNotice.IsHtml
            };

            base.Send(emailMessage as Message);
        }