mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
8cac7ed1cd
Notification ImplementationType was added for showing in UI (Humanized/Title cased of Implementation)
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
namespace NzbDrone.Core.Notifications.Email
|
|
{
|
|
public class EmailSettings : INotifcationSettings
|
|
{
|
|
[FieldDefinition(0, Label = "Server", HelpText = "Hostname or IP of Email server")]
|
|
public String Server { get; set; }
|
|
|
|
[FieldDefinition(1, Label = "Port")]
|
|
public Int32 Port { get; set; }
|
|
|
|
[FieldDefinition(2, Label = "SSL", Type = FieldType.Checkbox)]
|
|
public Boolean Ssl { get; set; }
|
|
|
|
[FieldDefinition(3, Label = "Username")]
|
|
public String Username { get; set; }
|
|
|
|
[FieldDefinition(4, Label = "Password", Type = FieldType.Password)]
|
|
public String Password { get; set; }
|
|
|
|
[FieldDefinition(5, Label = "From Address")]
|
|
public String From { get; set; }
|
|
|
|
[FieldDefinition(6, Label = "Recipient Address")]
|
|
public String To { get; set; }
|
|
|
|
public bool IsValid
|
|
{
|
|
get
|
|
{
|
|
return !string.IsNullOrWhiteSpace(Server) && Port > 0 && !string.IsNullOrWhiteSpace(From) && !string.IsNullOrWhiteSpace(To);
|
|
}
|
|
}
|
|
}
|
|
}
|