#865 #1459 Added the Sender From field for email notifcations. We can now have "Friendly Names" for email notifications.

Also fixed the copy and paste error with the Settings dropdowns. Slack menu item is now labelled Slack instead of Discord
This commit is contained in:
Jamie.Rees 2017-08-08 12:50:05 +01:00
parent d5477adc6b
commit 03add0ffc8
7 changed files with 22 additions and 12 deletions

View file

@ -29,7 +29,7 @@ namespace Ombi.Notifications
Body = body.ToMessageBody(),
Subject = model.Subject
};
message.From.Add(new MailboxAddress(settings.Sender, settings.Sender));
message.From.Add(new MailboxAddress(settings.SenderAddress, settings.SenderAddress));
message.To.Add(new MailboxAddress(model.To, model.To));
using (var client = new SmtpClient())
@ -71,7 +71,8 @@ namespace Ombi.Notifications
Body = body.ToMessageBody(),
Subject = model.Subject
};
message.From.Add(new MailboxAddress(settings.Sender, settings.Sender));
message.From.Add(new MailboxAddress(string.IsNullOrEmpty(settings.SenderName) ? settings.SenderAddress : settings.SenderName, settings.SenderAddress));
message.To.Add(new MailboxAddress(model.To, model.To));
using (var client = new SmtpClient())