Fix email subject to come from config for Health Check Notifier
This commit is contained in:
@@ -75,9 +75,10 @@ namespace Umbraco.Web.Scheduling
|
||||
using (var client = new SmtpClient())
|
||||
using (var mailMessage = new MailMessage())
|
||||
{
|
||||
mailMessage.To.Add(healthCheckConfig.NotificationSettings.EmailSettings.RecipientEmail);
|
||||
mailMessage.Body = string.Format("<html><body><p>Results of the scheduled Umbraco Health Checks run on {0} at {1} are as follows:</p>{2}</body></html>",
|
||||
DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), results.ResultsAsHtml());
|
||||
mailMessage.Subject = "Umbraco Scheduled HeathChecks Results";
|
||||
mailMessage.Subject = healthCheckConfig.NotificationSettings.EmailSettings.Subject;
|
||||
mailMessage.IsBodyHtml = true;
|
||||
|
||||
await client.SendMailAsync(mailMessage);
|
||||
|
||||
Reference in New Issue
Block a user