mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Rename CC
to Cc
This commit is contained in:
parent
529ea26ab6
commit
2cabc3eb0d
3 changed files with 9 additions and 9 deletions
|
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Test.NotificationTests.EmailTests
|
||||||
[TestCase("lidarr.audio")]
|
[TestCase("lidarr.audio")]
|
||||||
public void should_not_be_valid_if_cc_is_invalid(string email)
|
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();
|
_validator.Validate(_emailSettings).IsValid.Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ namespace NzbDrone.Core.Test.NotificationTests.EmailTests
|
||||||
public void should_not_be_valid_if_to_bcc_cc_are_all_empty()
|
public void should_not_be_valid_if_to_bcc_cc_are_all_empty()
|
||||||
{
|
{
|
||||||
_emailSettings.To = Array.Empty<string>();
|
_emailSettings.To = Array.Empty<string>();
|
||||||
_emailSettings.CC = Array.Empty<string>();
|
_emailSettings.Cc = Array.Empty<string>();
|
||||||
_emailSettings.Bcc = Array.Empty<string>();
|
_emailSettings.Bcc = Array.Empty<string>();
|
||||||
|
|
||||||
_validator.Validate(_emailSettings).IsValid.Should().BeFalse();
|
_validator.Validate(_emailSettings).IsValid.Should().BeFalse();
|
||||||
|
|
|
@ -92,7 +92,7 @@ namespace NzbDrone.Core.Notifications.Email
|
||||||
|
|
||||||
email.From.Add(ParseAddress("From", settings.From));
|
email.From.Add(ParseAddress("From", settings.From));
|
||||||
email.To.AddRange(settings.To.Select(x => ParseAddress("To", x)));
|
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.Bcc.AddRange(settings.Bcc.Select(x => ParseAddress("BCC", x)));
|
||||||
|
|
||||||
email.Subject = subject;
|
email.Subject = subject;
|
||||||
|
|
|
@ -16,13 +16,13 @@ namespace NzbDrone.Core.Notifications.Email
|
||||||
RuleFor(c => c.Port).InclusiveBetween(1, 65535);
|
RuleFor(c => c.Port).InclusiveBetween(1, 65535);
|
||||||
RuleFor(c => c.From).NotEmpty();
|
RuleFor(c => c.From).NotEmpty();
|
||||||
RuleForEach(c => c.To).EmailAddress();
|
RuleForEach(c => c.To).EmailAddress();
|
||||||
RuleForEach(c => c.CC).EmailAddress();
|
RuleForEach(c => c.Cc).EmailAddress();
|
||||||
RuleForEach(c => c.Bcc).EmailAddress();
|
RuleForEach(c => c.Bcc).EmailAddress();
|
||||||
|
|
||||||
// Only require one of three send fields to be set
|
// 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.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.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.Bcc).NotEmpty().Unless(c => c.To.Any() || c.Cc.Any());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace NzbDrone.Core.Notifications.Email
|
||||||
Port = 587;
|
Port = 587;
|
||||||
|
|
||||||
To = Array.Empty<string>();
|
To = Array.Empty<string>();
|
||||||
CC = Array.Empty<string>();
|
Cc = Array.Empty<string>();
|
||||||
Bcc = Array.Empty<string>();
|
Bcc = Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ namespace NzbDrone.Core.Notifications.Email
|
||||||
public IEnumerable<string> To { get; set; }
|
public IEnumerable<string> To { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(7, Label = "CC Address(es)", HelpText = "Comma separated list of email cc recipients", Advanced = true)]
|
[FieldDefinition(7, Label = "CC Address(es)", HelpText = "Comma separated list of email cc recipients", Advanced = true)]
|
||||||
public IEnumerable<string> CC { get; set; }
|
public IEnumerable<string> Cc { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(8, Label = "BCC Address(es)", HelpText = "Comma separated list of email bcc recipients", Advanced = true)]
|
[FieldDefinition(8, Label = "BCC Address(es)", HelpText = "Comma separated list of email bcc recipients", Advanced = true)]
|
||||||
public IEnumerable<string> Bcc { get; set; }
|
public IEnumerable<string> Bcc { get; set; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue