当前位置: 首页>>代码示例>>C#>>正文


C# hMailServer类代码示例

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


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

示例1: SetupSSLPorts

        public static void SetupSSLPorts(hMailServer.Application application, SslVersions sslVersions = null)
        {
            SSLCertificate sslCeritifcate = SetupSSLCertificate(application);

             var settings = application.Settings;

             var ports = settings.TCPIPPorts;

             ports.SetDefault();

             AddPort(ports, 25000, eConnectionSecurity.eCSNone, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11000, eConnectionSecurity.eCSNone, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14300, eConnectionSecurity.eCSNone, sslCeritifcate.ID, eSessionType.eSTIMAP);

             AddPort(ports, 25001, eConnectionSecurity.eCSTLS, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11001, eConnectionSecurity.eCSTLS, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14301, eConnectionSecurity.eCSTLS, sslCeritifcate.ID, eSessionType.eSTIMAP);

             AddPort(ports, 25002, eConnectionSecurity.eCSSTARTTLSOptional, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11002, eConnectionSecurity.eCSSTARTTLSOptional, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14302, eConnectionSecurity.eCSSTARTTLSOptional, sslCeritifcate.ID, eSessionType.eSTIMAP);

             AddPort(ports, 25003, eConnectionSecurity.eCSSTARTTLSRequired, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11003, eConnectionSecurity.eCSSTARTTLSRequired, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14303, eConnectionSecurity.eCSSTARTTLSRequired, sslCeritifcate.ID, eSessionType.eSTIMAP);

             settings.SslVersion30Enabled = sslVersions == null || sslVersions.Ssl30;
             settings.TlsVersion10Enabled = sslVersions == null || sslVersions.Tls10;
             settings.TlsVersion11Enabled = sslVersions == null || sslVersions.Tls11;
             settings.TlsVersion12Enabled = sslVersions == null || sslVersions.Tls12;

             application.Stop();
             application.Start();
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:34,代码来源:SslSetup.cs

示例2: AuthenticateUser

        public static bool AuthenticateUser(hMailServer.Application application)
        {
            // First try to authenticate using an empty password.
             if (AuthenticateUser(application, ""))
            return true;

             // Try to authenticate using password on command line...
             string [] args = Environment.GetCommandLineArgs();
             foreach (string password in args)
             {
            if (AuthenticateUser(application, password))
               return true;
             }

             while (true)
             {
            formEnterPassword passwordDlg = new formEnterPassword();

            if (passwordDlg.ShowDialog() != System.Windows.Forms.DialogResult.OK)
               return false;

            string password = passwordDlg.Password;

            if (AuthenticateUser(application, password))
               return true;

            MessageBox.Show("Invalid user name or password.", "hMailServer");
             }
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:29,代码来源:Authenticator.cs

示例3: formMain

        public formMain(hMailServer.Application application)
        {
            InitializeComponent();

             _application = application;
             _databaseType = null;
        }
开发者ID:baa-archieve,项目名称:hmailserver,代码行数:7,代码来源:formMain.cs

示例4: SaveProperties

 public void SaveProperties(hMailServer.WhiteListAddress address)
 {
     address.LowerIPAddress = textLowerIP.Text;
      address.UpperIPAddress = textUpperIP.Text;
      address.Description = textDescription.Text;
      address.EmailAddress = textEmailAddress.Text;
 }
开发者ID:digitalsoft,项目名称:hmailserver,代码行数:7,代码来源:formWhiteListAddress.cs

示例5: LoadProperties

 public void LoadProperties(hMailServer.WhiteListAddress address)
 {
     textLowerIP.Text = address.LowerIPAddress;
      textUpperIP.Text = address.UpperIPAddress;
      textDescription.Text = address.Description;
      textEmailAddress.Text = address.EmailAddress;
 }
开发者ID:digitalsoft,项目名称:hmailserver,代码行数:7,代码来源:formWhiteListAddress.cs

示例6: SetupSSLPorts

        public static void SetupSSLPorts(hMailServer.Application application)
        {
            SSLCertificate sslCeritifcate = SetupSSLCertificate(application);

             var ports = application.Settings.TCPIPPorts;

             AddPort(ports, 25000, eConnectionSecurity.eCSNone, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11000, eConnectionSecurity.eCSNone, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14300, eConnectionSecurity.eCSNone, sslCeritifcate.ID, eSessionType.eSTIMAP);

             AddPort(ports, 25001, eConnectionSecurity.eCSTLS, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11001, eConnectionSecurity.eCSTLS, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14301, eConnectionSecurity.eCSTLS, sslCeritifcate.ID, eSessionType.eSTIMAP);

             AddPort(ports, 25002, eConnectionSecurity.eCSSTARTTLSOptional, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11002, eConnectionSecurity.eCSSTARTTLSOptional, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14302, eConnectionSecurity.eCSSTARTTLSOptional, sslCeritifcate.ID, eSessionType.eSTIMAP);

             AddPort(ports, 25003, eConnectionSecurity.eCSSTARTTLSRequired, sslCeritifcate.ID, eSessionType.eSTSMTP);
             AddPort(ports, 11003, eConnectionSecurity.eCSSTARTTLSRequired, sslCeritifcate.ID, eSessionType.eSTPOP3);
             AddPort(ports, 14303, eConnectionSecurity.eCSSTARTTLSRequired, sslCeritifcate.ID, eSessionType.eSTIMAP);

             application.Stop();
             application.Start();
        }
开发者ID:digitalsoft,项目名称:hmailserver,代码行数:25,代码来源:SslSetup.cs

示例7: SetupSSLPorts

        public static void SetupSSLPorts(hMailServer.Application application, eConnectionSecurity security)
        {
            SSLCertificate sslCeritifcate = SetupSSLCertificate(application);

            TCPIPPort port = application.Settings.TCPIPPorts.Add();
            port.Address = "0.0.0.0";
            port.PortNumber = 250;
            port.ConnectionSecurity = security;
            port.SSLCertificateID = sslCeritifcate.ID;
            port.Protocol = eSessionType.eSTSMTP;
            port.Save();

            port = application.Settings.TCPIPPorts.Add();
            port.Address = "0.0.0.0";
            port.PortNumber = 11000;
            port.ConnectionSecurity = security;
            port.SSLCertificateID = sslCeritifcate.ID;
            port.Protocol = eSessionType.eSTPOP3;
            port.Save();

            port = application.Settings.TCPIPPorts.Add();
            port.Address = "0.0.0.0";
            port.PortNumber = 14300;
            port.ConnectionSecurity = security;
            port.SSLCertificateID = sslCeritifcate.ID;
            port.Protocol = eSessionType.eSTIMAP;
            port.Save();

            application.Stop();
            application.Start();
        }
开发者ID:japi,项目名称:hmailserver,代码行数:31,代码来源:SslSetup.cs

示例8: ucAccounts

        public ucAccounts(hMailServer.Domain domain)
        {
            InitializeComponent();

             representedDomain = domain;

             new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:8,代码来源:ucAccounts.cs

示例9: formAccountFolders

        public formAccountFolders(hMailServer.IMAPFolders imapFolders, bool publicFolders)
        {
            InitializeComponent();

             ucIMAPFolders1.LoadProperties(imapFolders, publicFolders);

             new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);

             Strings.Localize(this.buttonClose);
             this.Text = Strings.Localize(this.Text);
             ucIMAPFolders1.Localize();
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:12,代码来源:formAccountFolders.cs

示例10: ucDomain

        public ucDomain(hMailServer.Domain domain)
        {
            InitializeComponent();

            _domain = domain;

            EnableDisableTabs();

            DirtyChecker.SubscribeToChange(this, OnContentChanged);

            new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);

            EnableDisable();
        }
开发者ID:digitalsoft,项目名称:hmailserver,代码行数:14,代码来源:ucDomain.cs

示例11: GetAdministrationLevelName

        public static string GetAdministrationLevelName(hMailServer.eAdminLevel level)
        {
            switch (level)
             {
            case eAdminLevel.hAdminLevelNormal:
               return Strings.Localize("User");
            case eAdminLevel.hAdminLevelDomainAdmin:
               return Strings.Localize("Domain");
            case eAdminLevel.hAdminLevelServerAdmin:
               return Strings.Localize("Server");
             }

             throw new Exception("Unknown administration level");
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:14,代码来源:InternalNames.cs

示例12: formRuleAction

        public formRuleAction(hMailServer.Rule rule, hMailServer.RuleAction ruleAction)
        {
            InitializeComponent();

            _ruleAction = ruleAction;
            _isAccountLevelRule = rule.AccountID > 0;

            FillCombo();

            LoadProperties();

            new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
            Strings.Localize(this);
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:14,代码来源:formRuleAction.cs

示例13: formRuleCriteria

        public formRuleCriteria(hMailServer.RuleCriteria ruleCriteria)
        {
            InitializeComponent();

            _ruleCriteria = ruleCriteria;

            FillCombos();
            LoadProperties();

            new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
            Strings.Localize(this);

            _utilities = APICreator.Application.Utilities;
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:14,代码来源:formRuleCriteria.cs

示例14: formMain

        public formMain(hMailServer.Application app, string serverHost)
        {
            InitializeComponent();

            application = app;
            _serverHost = serverHost;
            currentlySelectedNode = null;

            _language = "English";

            LoadWindowSettings();

            _language = Strings.LoadLanguage(_language);
            Strings.Localize(this);
        }
开发者ID:nberardi,项目名称:hMailServer,代码行数:15,代码来源:formMain.cs

示例15: formFolderPermissions

        public formFolderPermissions(hMailServer.IMAPFolder folder)
        {
            InitializeComponent();

            EnableDisable();

            _folder = folder;

            ListPermissions();

            new TabOrderManager(this).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);

            labelPermissionsFor.Text = "";
            Strings.Localize(this);
        }
开发者ID:SpivEgin,项目名称:hmailserver,代码行数:15,代码来源:formFolderPermissions.cs


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