diff --git a/src/NzbDrone.Core.Test/NotificationTests/EmailTests/EmailSettingsValidatorFixture.cs b/src/NzbDrone.Core.Test/NotificationTests/EmailTests/EmailSettingsValidatorFixture.cs index ea889b8e6..178ddf2a4 100644 --- a/src/NzbDrone.Core.Test/NotificationTests/EmailTests/EmailSettingsValidatorFixture.cs +++ b/src/NzbDrone.Core.Test/NotificationTests/EmailTests/EmailSettingsValidatorFixture.cs @@ -75,7 +75,7 @@ public void should_not_be_valid_if_to_is_invalid(string email) [TestCase("radarr.video")] public void should_not_be_valid_if_cc_is_invalid(string email) { - _emailSettings.CC = new string[] { email }; + _emailSettings.Cc = new string[] { email }; _validator.Validate(_emailSettings).IsValid.Should().BeFalse(); } @@ -94,7 +94,7 @@ public void should_not_be_valid_if_bcc_is_invalid(string email) public void should_not_be_valid_if_to_bcc_cc_are_all_empty() { _emailSettings.To = Array.Empty(); - _emailSettings.CC = Array.Empty(); + _emailSettings.Cc = Array.Empty(); _emailSettings.Bcc = Array.Empty(); _validator.Validate(_emailSettings).IsValid.Should().BeFalse(); diff --git a/src/NzbDrone.Core/Notifications/Email/Email.cs b/src/NzbDrone.Core/Notifications/Email/Email.cs index 53361e555..7ab45ce1b 100644 --- a/src/NzbDrone.Core/Notifications/Email/Email.cs +++ b/src/NzbDrone.Core/Notifications/Email/Email.cs @@ -106,7 +106,7 @@ private void SendEmail(EmailSettings settings, string subject, string body, bool email.From.Add(ParseAddress("From", settings.From)); email.To.AddRange(settings.To.Select(x => ParseAddress("To", x))); - email.Cc.AddRange(settings.CC.Select(x => ParseAddress("CC", x))); + email.Cc.AddRange(settings.Cc.Select(x => ParseAddress("CC", x))); email.Bcc.AddRange(settings.Bcc.Select(x => ParseAddress("BCC", x))); email.Subject = subject; diff --git a/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs b/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs index 16fcd0541..ae495f42e 100644 --- a/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs +++ b/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs @@ -16,13 +16,13 @@ public EmailSettingsValidator() RuleFor(c => c.Port).InclusiveBetween(1, 65535); RuleFor(c => c.From).NotEmpty(); RuleForEach(c => c.To).EmailAddress(); - RuleForEach(c => c.CC).EmailAddress(); + RuleForEach(c => c.Cc).EmailAddress(); RuleForEach(c => c.Bcc).EmailAddress(); // Only require one of three send fields to be set - RuleFor(c => c.To).NotEmpty().Unless(c => c.Bcc.Any() || c.CC.Any()); - RuleFor(c => c.CC).NotEmpty().Unless(c => c.To.Any() || c.Bcc.Any()); - RuleFor(c => c.Bcc).NotEmpty().Unless(c => c.To.Any() || c.CC.Any()); + RuleFor(c => c.To).NotEmpty().Unless(c => c.Bcc.Any() || c.Cc.Any()); + RuleFor(c => c.Cc).NotEmpty().Unless(c => c.To.Any() || c.Bcc.Any()); + RuleFor(c => c.Bcc).NotEmpty().Unless(c => c.To.Any() || c.Cc.Any()); } } @@ -34,7 +34,7 @@ public EmailSettings() { Port = 567; To = Array.Empty(); - CC = Array.Empty(); + Cc = Array.Empty(); Bcc = Array.Empty(); } @@ -60,7 +60,7 @@ public EmailSettings() public IEnumerable To { get; set; } [FieldDefinition(7, Label = "CC Address(es)", HelpText = "Comma separated list of email cc recipients", Placeholder = "example@email.com,example1@email.com", Advanced = true)] - public IEnumerable CC { get; set; } + public IEnumerable Cc { get; set; } [FieldDefinition(8, Label = "BCC Address(es)", HelpText = "Comma separated list of email bcc recipients", Placeholder = "example@email.com,example1@email.com", Advanced = true)] public IEnumerable Bcc { get; set; }