Exemple #1
0
        private MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple SetListWithoutValidation(ICollection <string> addresses, JunkEmailCollection junk)
        {
            bool validating = junk.Validating;

            junk.Validating = false;
            junk.AddRange(addresses.ToArray <string>());
            junk.Validating = validating;
            return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationProblem.IsGood, string.Empty));
        }
Exemple #2
0
 private MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple SetDomainsList(ICollection <string> domains, JunkEmailCollection junk)
 {
     foreach (string text in domains)
     {
         if (this.IsUsersEmailOrDomain(text, true))
         {
             return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationProblem.IsUsersEmailOrDomain, text));
         }
     }
     try
     {
         junk.AddRange(domains.ToArray <string>());
     }
     catch (JunkEmailValidationException ex)
     {
         return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(ex.Problem, (string)ex.StringFormatParameters[0]));
     }
     return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationProblem.IsGood, string.Empty));
 }
Exemple #3
0
 private MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple SetEmailsList(ICollection <string> emails, JunkEmailCollection junk)
 {
     new List <MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple>();
     foreach (string text in emails)
     {
         if (this.IsUsersEmailOrDomain(text, false))
         {
             return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationProblem.IsUsersEmailOrDomain, text));
         }
         if (this.IsInternalToOrganization(text))
         {
             return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationProblem.IsInternalToOrganization, text));
         }
     }
     try
     {
         junk.AddRange(emails.ToArray <string>());
     }
     catch (JunkEmailValidationException ex)
     {
         return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(ex.Problem, (string)ex.StringFormatParameters[0]));
     }
     return(new MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationTuple(MailboxJunkEmailConfigurationDataProvider.JunkEmailValidationProblem.IsGood, string.Empty));
 }