| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- 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
- {
- /// <summary>
- /// SMTP server which sends out the mails
- /// </summary>
- [ConfigurationProperty("smtpServer", DefaultValue = "localhost", IsRequired = true)]
- public string SmtpServer
- {
- get
- {
- return (string)this["smtpServer"];
- }
- set
- {
- this["smtpServer"] = value;
- }
- }
- /// <summary>
- /// Server port where SMTP is available
- /// </summary>
- [ConfigurationProperty("port", DefaultValue = 25, IsRequired = true)]
- public int Port
- {
- get
- {
- return (int)this["port"];
- }
- set
- {
- this["port"] = value;
- }
- }
- /// <summary>
- /// Username which will be authenticated against SMTP server
- /// </summary>
- [ConfigurationProperty("username", DefaultValue = "", IsRequired = false)]
- public string Username
- {
- get
- {
- return (string)this["username"];
- }
- set
- {
- this["username"] = value;
- }
- }
- /// <summary>
- /// Domain in which the users exists
- /// </summary>
- [ConfigurationProperty("domain", DefaultValue = "", IsRequired = false)]
- public string Domain
- {
- get
- {
- return (string)this["domain"];
- }
- set
- {
- this["domain"] = value;
- }
- }
- /// <summary>
- /// Password of the authenticated user
- /// </summary>
- [ConfigurationProperty("password", DefaultValue = "", IsRequired = false)]
- public string Password
- {
- get
- {
- return (string)this["password"];
- }
- set
- {
- this["password"] = value;
- }
- }
- /// <summary>
- /// Determines if the connection should use SSL/TLS
- /// </summary>
- [ConfigurationProperty("useSsl", DefaultValue = false, IsRequired = false)]
- public bool UseSsl
- {
- get
- {
- return (bool)this["useSsl"];
- }
- set
- {
- this["useSsl"] = value;
- }
- }
- }
- }
|