diff --git a/src/Ombi.Notifications/GenericEmailProvider.cs b/src/Ombi.Notifications/GenericEmailProvider.cs index c95fd9f23..f32b7941b 100644 --- a/src/Ombi.Notifications/GenericEmailProvider.cs +++ b/src/Ombi.Notifications/GenericEmailProvider.cs @@ -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()) diff --git a/src/Ombi.Settings/Settings/Models/Notifications/EmailNotificationSettings.cs b/src/Ombi.Settings/Settings/Models/Notifications/EmailNotificationSettings.cs index 581062662..2e222de29 100644 --- a/src/Ombi.Settings/Settings/Models/Notifications/EmailNotificationSettings.cs +++ b/src/Ombi.Settings/Settings/Models/Notifications/EmailNotificationSettings.cs @@ -6,7 +6,8 @@ public string Host { get; set; } public string Password { get; set; } public int Port { get; set; } - public string Sender { get; set; } + public string SenderName { get; set; } + public string SenderAddress { get; set; } public string Username { get; set; } public bool Authentication { get; set; } public string AdminEmail { get; set; } diff --git a/src/Ombi/ClientApp/app/interfaces/INotifcationSettings.ts b/src/Ombi/ClientApp/app/interfaces/INotifcationSettings.ts index 18a4aa9ac..a7e53c53a 100644 --- a/src/Ombi/ClientApp/app/interfaces/INotifcationSettings.ts +++ b/src/Ombi/ClientApp/app/interfaces/INotifcationSettings.ts @@ -10,7 +10,8 @@ export interface IEmailNotificationSettings extends INotificationSettings { host: string, password: string, port: number, - sender: string, + senderAddress: string, + senderName:string, username: string, authentication: boolean, adminEmail: string, diff --git a/src/Ombi/ClientApp/app/settings/notifications/emailnotification.component.html b/src/Ombi/ClientApp/app/settings/notifications/emailnotification.component.html index ab99f01a4..6c7a1259a 100644 --- a/src/Ombi/ClientApp/app/settings/notifications/emailnotification.component.html +++ b/src/Ombi/ClientApp/app/settings/notifications/emailnotification.component.html @@ -21,8 +21,8 @@