internal static void ValidateMatchSubDomains(bool matchSubDomains, AcceptedDomainType domainType, Task.TaskErrorLoggingDelegate errorWriter)
 {
     if (matchSubDomains && domainType != AcceptedDomainType.InternalRelay)
     {
         errorWriter(new MatchSubDomainsIsInternalRelayOnlyException(), ErrorCategory.InvalidArgument, null);
     }
 }
Example #2
0
        public AcceptedDomain(AcceptedDomain domain) : base(domain)
        {
            string text = domain.DomainName.IsStar ? domain.DomainName.ToString() : domain.DomainName.SmtpDomain.ToString();

            base.Text               = text;
            base.Value              = text;
            base.Selected           = domain.Default;
            this.AuthenticationType = domain.AuthenticationType;
            this.DomainType         = domain.DomainType;
        }