예제 #1
0
        private static void FillMailDomainFields(MailDomain domain, SettingsRequestResult addResult)
        {
            foreach (string pair in addResult.settingValues)
            {
                string[] parts = pair.Split('=');
                switch (parts[0])
                {
                    case "catchall":
                        domain.CatchAllAccount = parts[1];
                        break;
                    case "isenabled":
                        domain.Enabled = Boolean.Parse(parts[1]);
                        break;
                    case "ldapport":
                        domain.LdapPort = int.Parse(parts[1]);
                        break;
                    case "altsmtpport":
                        domain.SmtpPortAlt = int.Parse(parts[1]);
                        break;
                    case "sharedcalendar":
                        domain.SharedCalendars = Boolean.Parse(parts[1]);
                        break;
                    case "sharedcontact":
                        domain.SharedContacts = Boolean.Parse(parts[1]);
                        break;
                    case "sharedfolder":
                        domain.SharedFolders = Boolean.Parse(parts[1]);
                        break;
                    case "sharednotes":
                        domain.SharedNotes = Boolean.Parse(parts[1]);
                        break;
                    case "sharedtasks":
                        domain.SharedTasks = Boolean.Parse(parts[1]);
                        break;
                    case "sharedgal":
                        domain.IsGlobalAddressList = Boolean.Parse(parts[1]);
                        break;
                    case "bypassforwardblacklist":
                        domain.BypassForwardBlackList = Boolean.Parse(parts[1]);
                        break;     
					
                }
            }
        }
예제 #2
0
		private static void FillMailDomainFields(MailDomain domain, SettingsRequestResult addResult)
		{
			foreach (string pair in addResult.settingValues)
			{
				string[] parts = pair.Split('=');
				switch (parts[0])
				{
					case "catchall":
						domain.CatchAllAccount = parts[1];
						break;
					case "enablecatchalls":
						if (String.Equals(parts[1], "Enabled"))
							domain[MailDomain.SMARTERMAIL5_CATCHALLS_ENABLED] = "True";
						if (String.Equals(parts[1], "Disabled"))
							domain[MailDomain.SMARTERMAIL5_CATCHALLS_ENABLED] = "False";
						break;
					case "enablepopretrieval":
						domain[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ENABLED] = parts[1];
						break;
					case "isenabled":
						domain.Enabled = Boolean.Parse(parts[1]);
						break;
					case "ldapport":
						domain.LdapPort = int.Parse(parts[1]);
						break;
					case "altsmtpport":
						domain.SmtpPortAlt = int.Parse(parts[1]);
						break;
					case "sharedcalendar":
						domain.SharedCalendars = Boolean.Parse(parts[1]);
						break;
					case "sharedcontact":
						domain.SharedContacts = Boolean.Parse(parts[1]);
						break;
					case "sharedfolder":
						domain.SharedFolders = Boolean.Parse(parts[1]);
						break;
					case "sharednotes":
						domain.SharedNotes = Boolean.Parse(parts[1]);
						break;
					case "sharedtasks":
						domain.SharedTasks = Boolean.Parse(parts[1]);
						break;
					case "sharedgal":
						domain.IsGlobalAddressList = Boolean.Parse(parts[1]);
						break;
					case "bypassforwardblacklist":
						domain.BypassForwardBlackList = Boolean.Parse(parts[1]);
						break;
					case "showdomainreports":
						domain[MailDomain.SMARTERMAIL5_SHOW_DOMAIN_REPORTS] = parts[1];
						break;
					case "maxmessagesperhour":
						domain[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR] = parts[1];
						break;
					case "maxmessagesperhourenabled":
						domain[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED] = parts[1];
						break;
					case "maxsmtpoutbandwidthperhour":
						domain[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR] = parts[1];
						break;
					case "maxsmtpoutbandwidthperhourenabled":
						domain[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED] = parts[1];
						break;
					case "maxpopretrievalaccounts":
						domain[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ACCOUNTS] = parts[1];
						break;
					case "maxbouncesreceivedperhour":
						domain[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR] = parts[1];
						break;
					case "maxbouncesreceivedperhourenabled":
						domain[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED] = parts[1];
						break;
					case "enableimapretrieval":
						domain[MailDomain.SMARTERMAIL6_IMAP_RETREIVAL_ENABLED] = parts[1];
						break;
					case "enablemailsigning":
						domain[MailDomain.SMARTERMAIL6_MAIL_SIGNING_ENABLED] = parts[1];
						break;
					case "enableemailreports":
						domain[MailDomain.SMARTERMAIL6_EMAIL_REPORTS_ENABLED] = parts[1];
						break;
					case "syncml":
						domain[MailDomain.SMARTERMAIL6_SYNCML_ENABLED] = parts[1];
						break;
				}
			}
		}