using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GreenTree.Nachtragsmanagement.Core.Configuration { public class MailServerElement : ConfigurationElement { /// /// SMTP server which sends out the mails /// [ConfigurationProperty("smtpServer", DefaultValue = "localhost", IsRequired = true)] public string SmtpServer { get { return (string)this["smtpServer"]; } set { this["smtpServer"] = value; } } /// /// Server port where SMTP is available /// [ConfigurationProperty("port", DefaultValue = 25, IsRequired = true)] public int Port { get { return (int)this["port"]; } set { this["port"] = value; } } /// /// Username which will be authenticated against SMTP server /// [ConfigurationProperty("username", DefaultValue = "", IsRequired = false)] public string Username { get { return (string)this["username"]; } set { this["username"] = value; } } /// /// Domain in which the users exists /// [ConfigurationProperty("domain", DefaultValue = "", IsRequired = false)] public string Domain { get { return (string)this["domain"]; } set { this["domain"] = value; } } /// /// Password of the authenticated user /// [ConfigurationProperty("password", DefaultValue = "", IsRequired = false)] public string Password { get { return (string)this["password"]; } set { this["password"] = value; } } /// /// Determines if the connection should use SSL/TLS /// [ConfigurationProperty("useSsl", DefaultValue = false, IsRequired = false)] public bool UseSsl { get { return (bool)this["useSsl"]; } set { this["useSsl"] = value; } } } }