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


C# hMailServer.Start方法代码示例

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


在下文中一共展示了hMailServer.Start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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


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