System.Net.Mail.SmtpTransport.GetConnection C# (CSharp) Method

GetConnection() private method

private GetConnection ( string host, int port ) : void
host string
port int
return void
        internal void GetConnection(string host, int port)
        {
            try
            {
                _connection = new SmtpConnection(this, _client, _credentials, _authenticationModules);
                _connection.Timeout = _timeout;
                if (NetEventSource.IsEnabled) NetEventSource.Associate(this, _connection);

                if (EnableSsl)
                {
                    _connection.EnableSsl = true;
                    _connection.ClientCertificates = ClientCertificates;
                }

                _connection.GetConnection(host, port);
            }
            finally { }
        }

Usage Example

Example #1
0
 private void GetConnection()
 {
     if (!_transport.IsConnected)
     {
         _transport.GetConnection(_host, _port);
     }
 }
All Usage Examples Of System.Net.Mail.SmtpTransport::GetConnection