private string PrepareEmailBody(EmailTemplateModel model) { var emailTemplate = new EmailTemplate(model); return emailTemplate.TransformText(); }
protected virtual MailMessage PrepareEmail(LoggingEvent loggingEvent) { var model = new EmailTemplateModel(loggingEvent) { Title = Title, TitleUri = TitleUri, IpAddressInfoUri = IpAddressInfoUri, UserAgentInfoUri = UserAgentInfoUri }; var mailMessage = new MailMessage(From, To); mailMessage.Subject = model.GetFormattedSubject(); mailMessage.IsBodyHtml = true; mailMessage.Body = PrepareEmailBody(model); return mailMessage; }