New: Option to attach files to email notifications (#18)

This commit is contained in:
Thomas Mathews
2020-05-10 15:09:43 +01:00
committed by GitHub
parent 8c2750e96c
commit 663aa462b0
13 changed files with 59 additions and 31 deletions
@@ -1,4 +1,5 @@
using FluentValidation;
using System.Collections.Generic;
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Validation;
@@ -23,6 +24,10 @@ namespace NzbDrone.Core.Notifications.Email
public EmailSettings()
{
Port = 25;
To = new string[] { };
CC = new string[] { };
Bcc = new string[] { };
}
[FieldDefinition(0, Label = "Server", HelpText = "Hostname or IP of Email server")]
@@ -43,8 +48,17 @@ namespace NzbDrone.Core.Notifications.Email
[FieldDefinition(5, Label = "From Address")]
public string From { get; set; }
[FieldDefinition(6, Label = "Recipient Address")]
public string To { get; set; }
[FieldDefinition(6, Label = "Recipient Address(es)", HelpText = "Comma seperated list of email recipients")]
public IEnumerable<string> To { get; set; }
[FieldDefinition(7, Label = "CC Address(es)", HelpText = "Comma seperated list of email cc recipients", Advanced = true)]
public IEnumerable<string> CC { get; set; }
[FieldDefinition(8, Label = "BCC Address(es)", HelpText = "Comma seperated list of email bcc recipients", Advanced = true)]
public IEnumerable<string> Bcc { get; set; }
[FieldDefinition(9, Label = "Attach Books", HelpText = "Add books as an attachment on import", Type = FieldType.Checkbox)]
public bool AttachFiles { get; set; }
public NzbDroneValidationResult Validate()
{