• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Mail.MailDomain类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中WebsitePanel.Providers.Mail.MailDomain的典型用法代码示例。如果您正苦于以下问题:C# MailDomain类的具体用法?C# MailDomain怎么用?C# MailDomain使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MailDomain类属于WebsitePanel.Providers.Mail命名空间,在下文中一共展示了MailDomain类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SaveItem

		public void SaveItem(MailDomain item)
		{
			item.CatchAllAccount = ddlCatchAllAccount.SelectedValue;
			SaveQuotas(item);

			featuresSection.SaveItem(item);
            sharingSection.SaveItem(item);
            throttlingSection.SaveItem(item);
			
            
			if (item[MailDomain.SMARTERMAIL_LICENSE_TYPE] == "PRO")
			{
				secSharing.Visible = false;
				sharingSection.Visible = false;
				secThrottling.Visible = false;
				throttlingSection.Visible = false;
			}
			else
			{
				sharingSection.SaveItem(item);
				throttlingSection.SaveItem(item);
			}
            

		}
开发者ID:jordan49,项目名称:websitepanel,代码行数:25,代码来源:SmarterMail50_EditDomain.ascx.cs


示例2: BindItem

        public void BindItem(MailDomain item)
        {
            // Hide/show controls when not enabled on service level
            rowMaxDomainDiskSpace.Visible = item.UseDomainDiskQuota;
            rowDomainLimits.Visible = item.UseDomainLimits;
            rowUserLimits.Visible = item.UseUserLimits;

            txtMaxDomainDiskSpace.Text = item.MaxDomainSizeInMB.ToString();
            txtMaxDomainUsers.Text = item.MaxDomainUsers.ToString();
            txtLimitVolume.Text = item.MegaByteSendLimit.ToString();
            txtLimitNumber.Text = item.NumberSendLimit.ToString();
            txtDefaultUserQuotaInMB.Text = item.DefaultUserQuotaInMB.ToString();
            txtDefaultUserMaxMessageSizeMegaByte.Text = item.DefaultUserMaxMessageSizeMegaByte.ToString();
            txtDefaultUserMegaByteSendLimit.Text = item.DefaultUserMegaByteSendLimit.ToString();
            txtDefaultUserNumberSendLimit.Text = item.DefaultUserNumberSendLimit.ToString();

            if (!IsPostBack)
            {
                var accounts = ES.Services.MailServers.GetMailAccounts(item.PackageId, false);
                ddlCatchAllAccount.DataSource = accounts;
                ddlCatchAllAccount.DataBind();
                ddlPostMasterAccount.DataSource = accounts;
                ddlPostMasterAccount.DataBind();
            }

            Utils.SelectListItem(ddlCatchAllAccount, item.CatchAllAccount);
            Utils.SelectListItem(ddlPostMasterAccount, item.PostmasterAccount);

        }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:29,代码来源:IceWarp_EditDomain.ascx.cs


示例3: BindItem

		public void BindItem(MailDomain item)
		{
			cbShowcontentfilteringmenu.Checked = item.ShowContentFilteringMenu;
			cbShowdomainaliasmenu.Checked = item.ShowDomainAliasMenu;
			cbShowlistmenu.Checked = item.ShowListMenu;
			cbShowspammenu.Checked = item.ShowSpamMenu;
			cbShowDomainReports.Checked = item.ShowsStatsMenu;
		}
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:8,代码来源:SmarterMail_EditDomain_Features.ascx.cs


示例4: BindItem

        public void BindItem(MailDomain item)
        {
            BindMailboxes(item);

            chkDomainSmartHostEnabled.Checked = Convert.ToBoolean(item["MailEnable_SmartHostEnabled"]);
            chkDomainSmartHostAuthSenders.Checked = Convert.ToBoolean(item["MailEnable_SmartHostAuth"]);
            txtDestination.Text = item.RedirectionHosts;
        }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:8,代码来源:MailEnable_EditDomain.ascx.cs


示例5: BindItem

 public void BindItem(MailDomain item)
 {
     cbGlobalAddressList.Checked = item.IsGlobalAddressList;
     cbSharedCalendars.Checked = item.SharedCalendars;
     cbSharedContacts.Checked = item.SharedContacts;
     cbSharedFolders.Checked = item.SharedFolders;
     cbSharedNotes.Checked = item.SharedNotes;
     cbSharedTasks.Checked = item.SharedTasks;
 }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:9,代码来源:SmarterMail50_EditDomain_Sharing.ascx.cs


示例6: BindMailboxes

		private void BindMailboxes(MailDomain item)
		{
			MailAccount[] accounts = ES.Services.MailServers.GetMailAccounts(item.PackageId, false);
            MailAlias[] forwardings = ES.Services.MailServers.GetMailForwardings(item.PackageId, false);

			BindAccounts(item, ddlCatchAllAccount, accounts);
			BindAccounts(item, ddlCatchAllAccount, forwardings);
			Utils.SelectListItem(ddlCatchAllAccount, item.CatchAllAccount);
		}
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:9,代码来源:AbilityMailServer_EditDomain.ascx.cs


示例7: BindItem

		public void BindItem(MailDomain item)
		{
			txtMessagesPerHour.Text = item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR];
			cbMessagesPerHour.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED]);
			txtBandwidthPerHour.Text = item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR];
			cbBandwidthPerHour.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED]);
			txtBouncesPerHour.Text = item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR];
			cbBouncesPerHour.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED]);
		}
开发者ID:jordan49,项目名称:websitepanel,代码行数:9,代码来源:SmarterMail50_EditDomain_Throttling.ascx.cs


示例8: SaveItem

		public void SaveItem(MailDomain item)
		{
			item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR] = txtMessagesPerHour.Text;
			item[MailDomain.SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED] = cbMessagesPerHour.Checked.ToString();
			item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR] = txtBandwidthPerHour.Text;
			item[MailDomain.SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED] = cbBandwidthPerHour.Checked.ToString();
			item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR] = txtBouncesPerHour.Text;
			item[MailDomain.SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED] = cbBouncesPerHour.Checked.ToString();
		}
开发者ID:jordan49,项目名称:websitepanel,代码行数:9,代码来源:SmarterMail50_EditDomain_Throttling.ascx.cs


示例9: SaveItem

 public void SaveItem(MailDomain item)
 {
     item.IsGlobalAddressList = cbGlobalAddressList.Checked;
     item.SharedCalendars = cbSharedCalendars.Checked;
     item.SharedContacts = cbSharedContacts.Checked;
     item.SharedFolders = cbSharedFolders.Checked;
     item.SharedNotes = cbSharedNotes.Checked;
     item.SharedTasks = cbSharedTasks.Checked;
     
 }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:10,代码来源:SmarterMail50_EditDomain_Sharing.ascx.cs


示例10: SaveQuotas

 private void SaveQuotas(MailDomain item)
 {                        
     item.MaxDomainSizeInMB = Utils.ParseInt(txtSize.Text);
     item.MaxDomainAliases = Utils.ParseInt(txtDomainAliases.Text);
     item.MaxDomainUsers = Utils.ParseInt(txtUser.Text);
     item.MaxAliases = Utils.ParseInt(txtUserAliases.Text);
     item.MaxLists = Utils.ParseInt(txtMailingLists.Text);            
     item.MaxRecipients = Utils.ParseInt(txtRecipientsPerMessage.Text);
     item.MaxMessageSize = Utils.ParseInt(txtMessageSize.Text);
 }
开发者ID:jordan49,项目名称:websitepanel,代码行数:10,代码来源:SmarterMail_EditDomain.ascx.cs


示例11: BindItem

		public void BindItem(MailDomain item)
		{
			cbShowcontentfilteringmenu.Checked = item.ShowContentFilteringMenu;
			cbShowdomainaliasmenu.Checked = item.ShowDomainAliasMenu;
			cbShowlistmenu.Checked = item.ShowListMenu;
			cbShowspammenu.Checked = item.ShowSpamMenu;
			cbShowDomainReports.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_SHOW_DOMAIN_REPORTS]);
			cbEnablePopRetreival.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ENABLED]);
		    cbEnableCatchAlls.Checked = Convert.ToBoolean(item[MailDomain.SMARTERMAIL5_CATCHALLS_ENABLED]);
		}
开发者ID:jordan49,项目名称:websitepanel,代码行数:10,代码来源:SmarterMail50_EditDomain_Features.ascx.cs


示例12: SaveItem

		public void SaveItem(MailDomain item)
		{
			item.ShowContentFilteringMenu = cbShowcontentfilteringmenu.Checked;
			item.ShowDomainAliasMenu = cbShowdomainaliasmenu.Checked;
			item.ShowListMenu = cbShowlistmenu.Checked;
			item.ShowSpamMenu = cbShowspammenu.Checked;
			item[MailDomain.SMARTERMAIL5_SHOW_DOMAIN_REPORTS] = cbShowDomainReports.Checked.ToString();
			item[MailDomain.SMARTERMAIL5_POP_RETREIVAL_ENABLED] = cbEnablePopRetreival.Checked.ToString();
		    item[MailDomain.SMARTERMAIL5_CATCHALLS_ENABLED] = cbEnableCatchAlls.Checked.ToString();
		}
开发者ID:jordan49,项目名称:websitepanel,代码行数:10,代码来源:SmarterMail50_EditDomain_Features.ascx.cs


示例13: BindItem

        private void BindItem()
        {
            try
            {
                if (!IsPostBack)
                {
                    // load item if required
                    if (PanelRequest.ItemID > 0)
                    {
                        // existing item
                        try
                        {
                            item = ES.Services.MailServers.GetMailDomain(PanelRequest.ItemID);
                        }
                        catch (Exception ex)
                        {
                            ShowErrorMessage("MAIL_GET_DOMAIN", ex);
                            return;
                        }

                        if (item != null)
                        {
                            // save package info
                            ViewState["PackageId"] = item.PackageId;
                        }
                        else
                            RedirectToBrowsePage();
                    }
                }

                // load provider control
                LoadProviderControl((int)ViewState["PackageId"], "Mail", providerControl, "EditDomain.ascx");

                if (!IsPostBack)
                {
                    // bind item to controls
                    if (item != null)
                    {
                        // bind item to controls
                        litDomainName.Text = item.Name;

                        // other controls
                        IMailEditDomainControl ctrl = (IMailEditDomainControl)providerControl.Controls[0];
                        ctrl.BindItem(item);

                        BindPointers();
                    }
                }
            }
            catch (Exception ex)
            {
                ShowErrorMessage("MAIL_INIT_DOMAIN_FORM", ex);
                return;
            }
        }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:55,代码来源:MailDomainsEditDomain.ascx.cs


示例14: SaveItem

 public void SaveItem(MailDomain item)
 {
     item.CatchAllAccount = ddlCatchAllAccount.SelectedValue;
     item.PostmasterAccount = ddlPostMasterAccount.SelectedValue;
     item.MaxDomainSizeInMB = Convert.ToInt32(txtMaxDomainDiskSpace.Text);
     item.MaxDomainUsers = Convert.ToInt32(txtMaxDomainUsers.Text);
     item.NumberSendLimit = Convert.ToInt32(txtLimitNumber.Text);
     item.MegaByteSendLimit = Convert.ToInt32(txtLimitVolume.Text);
     item.DefaultUserQuotaInMB = Convert.ToInt32(txtDefaultUserQuotaInMB.Text);
     item.DefaultUserMaxMessageSizeMegaByte = Convert.ToInt32(txtDefaultUserMaxMessageSizeMegaByte.Text);
     item.DefaultUserMegaByteSendLimit = Convert.ToInt32(txtDefaultUserMegaByteSendLimit.Text);
     item.DefaultUserNumberSendLimit = Convert.ToInt32(txtDefaultUserNumberSendLimit.Text);
 }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:13,代码来源:IceWarp_EditDomain.ascx.cs


示例15: SaveItem

        public void SaveItem(MailDomain item)
        {
            item.AbuseAccount = ddlAbuseAccount.SelectedValue;
            item.PostmasterAccount = ddlPostmasterAccount.SelectedValue;

            // if we have a smarthost we need to clear the catchall
            if (chkDomainSmartHostEnabled.Checked)
                item.CatchAllAccount= "";
            else
                item.CatchAllAccount = ddlCatchAllAccount.SelectedValue;

            item["MailEnable_SmartHostEnabled"] = chkDomainSmartHostEnabled.Checked.ToString();
            item["MailEnable_SmartHostAuth"] = chkDomainSmartHostAuthSenders.Checked.ToString(); 
            item.RedirectionHosts = txtDestination.Text;
        }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:15,代码来源:MailEnable_EditDomain.ascx.cs


示例16: BindAccounts

		private void BindAccounts(MailDomain item, DropDownList ddl, MailAccount[] accounts)
		{
			if (ddl.Items.Count == 0)
				ddl.Items.Add(new ListItem(GetLocalizedString("Text.NotSelected"), ""));

			foreach (MailAccount account in accounts)
			{
				int idx = account.Name.IndexOf("@");
				string accountName = account.Name.Substring(0, idx);
				string accountDomain = account.Name.Substring(idx + 1);

				if (String.Compare(accountDomain, item.Name, true) == 0)
					ddl.Items.Add(new ListItem(account.Name, accountName));
			}
		}
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:15,代码来源:AbilityMailServer_EditDomain.ascx.cs


示例17: BindItem

        public void BindItem(MailDomain item)
        {            
            BindMailboxes(item);
            BindQuotas(item);
            featuresSection.BindItem(item);

			if (item[MailDomain.SMARTERMAIL_LICENSE_TYPE] == "PRO")
			{
				secSharing.Visible = false;
				sharingSection.Visible = false;
			}
			else
			{
				sharingSection.BindItem(item);
			}
        }
开发者ID:jordan49,项目名称:websitepanel,代码行数:16,代码来源:SmarterMail_EditDomain.ascx.cs


示例18: CreateDomain

        /// <summary>
        /// Creates a new domain in the specified folder 
        /// </summary>
        /// <param name="domain">Domain info</param>
        public virtual void CreateDomain(MailDomain domain)
        {
            try
            {
                svcDomainAdmin domains = new svcDomainAdmin();
                PrepareProxy(domains);

				
                DomainSettingsResult defaultDomainSettings = domains.GetDomainDefaults(AdminUsername, AdminPassword);

                SettingsRequestResult defaultRequestedSettings =
                    domains.GetRequestedDomainDefaults(AdminUsername, AdminPassword, new string[] { 
                        "defaultaltsmtpport",
						"defaultimapport",
						"defaultmaxaliases",
						"defaultmaxdomainaliases",
						"defaultmaxdomainsize",
						"defaultmaxdomainusers",
						"defaultmaxlists",
						"defaultmaxmailboxsize",
						"defaultmaxmessagesize",
						"defaultmaxrecipients",
						"defaultpopport",
						"defaultshowcontentfilteringmenu",
						"defaultshowdomainaliasmenu",
						"defaultshowlistmenu",
						"defaultshowspammenu",
						"defaultshowstatmenu",
						"defaultsmtpauthenticationrequired",
						"defaultsmtpport",
						"defaultbypassforwardblacklist",
						"defaultldapport",
						"defaultldapdisallowoptout",
						"defaultsharedcalendar",
						"defaultsharedcontact",
						"defaultsharedfolder",
						"defaultsharedtasks",
						"defaultsharedgal"
						});


            	string[] requestedDomainDefaults = defaultRequestedSettings.settingValues;

				//domain Path is taken from WebsitePanel Service settings

                GenericResult1 result = null;

                if (!InheritDomainDefaultLimits)
                {
                    result = domains.AddDomain(AdminUsername, AdminPassword,
                                                             domain.Name,
                                                             Path.Combine(DomainsPath, domain.Name),
                                                             SYSTEM_DOMAIN_ADMIN, // admin username
                                                             Guid.NewGuid().ToString("P"), // admin password
                                                             "Domain", // admin first name
                                                             "Administrator", // admin last name
                                                             ServerIP,
                                                             defaultDomainSettings.ImapPort,
                                                             defaultDomainSettings.PopPort,
                                                             defaultDomainSettings.SmtpPort,
                                                             domain.MaxAliases,
                                                             domain.MaxDomainSizeInMB,
                                                             domain.MaxDomainUsers,
                                                             domain.MaxMailboxSizeInMB,
                                                             domain.MaxMessageSize,
                                                             domain.MaxRecipients,
                                                             domain.MaxDomainAliases,
                                                             domain.MaxLists,
                                                             defaultDomainSettings.ShowDomainAliasMenu,// ShowDomainAliasMenu
                                                             defaultDomainSettings.ShowContentFilteringMenu,// ShowContentFilteringMenu
                                                             defaultDomainSettings.ShowSpamMenu, // ShowSpamMenu
                                                             defaultDomainSettings.ShowStatsMenu, // ShowStatsMenu
                                                             defaultDomainSettings.RequireSmtpAuthentication,
                                                             defaultDomainSettings.ShowListMenu, // ShowListMenu
                                                             defaultDomainSettings.ListCommandAddress);
                }
                else
                {
                    result = domains.AddDomain(AdminUsername, AdminPassword,
                                                             domain.Name,
                                                             Path.Combine(DomainsPath, domain.Name),
                                                             SYSTEM_DOMAIN_ADMIN, // admin username
                                                             Guid.NewGuid().ToString("P"), // admin password
                                                             "Domain", // admin first name
                                                             "Administrator", // admin last name
                                                             ServerIP,
                                                             defaultDomainSettings.ImapPort,
                                                             defaultDomainSettings.PopPort,
                                                             defaultDomainSettings.SmtpPort,
                                                             defaultDomainSettings.MaxAliases,
                                                             defaultDomainSettings.MaxDomainSizeInMB,
                                                             defaultDomainSettings.MaxDomainUsers,
                                                             defaultDomainSettings.MaxMailboxSizeInMB,
                                                             defaultDomainSettings.MaxMessageSize,
                                                             defaultDomainSettings.MaxRecipients,
                                                             defaultDomainSettings.MaxDomainAliases,
//.........这里部分代码省略.........
开发者ID:jordan49,项目名称:websitepanel,代码行数:101,代码来源:SmarterMail2.cs


示例19: CreateDomain

		public void CreateDomain(MailDomain domain)
		{
			Tree domains = AMSHelper.GetDomainsConfig();
			AmsDomain amsDomain = new AmsDomain(domain.Name);

			if (amsDomain.Load(domains))
				throw new Exception("Domain is already registered.");

			amsDomain.Read(domain);

			if (!amsDomain.Save(domains))
				throw new Exception("Couldn't create a domain.");
		}
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:13,代码来源:AbilityMailServer.cs


示例20: SaveItem

		public void SaveItem(MailDomain item)
		{
			item.CatchAllAccount = ddlCatchAllAccount.SelectedValue;
		}
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:4,代码来源:AbilityMailServer_EditDomain.ascx.cs



注:本文中的WebsitePanel.Providers.Mail.MailDomain类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Mail.MailGroup类代码示例发布时间:2022-05-26
下一篇:
C# Mail.MailAlias类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap