GetConnection() 개인적인 메소드

private GetConnection ( string host, int port ) : void
host string
port int
리턴 void
예제 #1
0
        internal void GetConnection(string host, int port)
        {
            try
            {
                lock (this)
                {
                    _connection = new SmtpConnection(this, _client, _credentials, _authenticationModules);
                    if (_shouldAbort)
                    {
                        _connection.Abort();
                    }
                    _shouldAbort = false;
                }

                if (NetEventSource.IsEnabled)
                {
                    NetEventSource.Associate(this, _connection);
                }

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

                _connection.GetConnection(host, port);
            }
            finally { }
        }
예제 #2
0
        internal void GetConnection(string host, int port)
        {
            try
            {
                _connection         = new SmtpConnection(this, _client, _credentials, _authenticationModules);
                _connection.Timeout = _timeout;
                if (MailEventSource.Log.IsEnabled())
                {
                    MailEventSource.Log.Associate(this, _connection);
                }

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

                _connection.GetConnection(host, port);
            }
            finally { }
        }
        internal void GetConnection(ServicePoint servicePoint)
        {
            try {
                Debug.Assert(servicePoint != null, "no ServicePoint provided by SmtpClient");
                // check to see if we have a different connection than last time
                UpdateServicePoint(servicePoint);
                connection         = new SmtpConnection(this, client, credentials, authenticationModules);
                connection.Timeout = timeout;
                if (Logging.On)
                {
                    Logging.Associate(Logging.Web, this, connection);
                }

                if (EnableSsl)
                {
                    connection.EnableSsl          = true;
                    connection.ClientCertificates = ClientCertificates;
                }
                connection.GetConnection(servicePoint);
            }
            finally {
            }
        }
예제 #4
0
 internal void GetConnection(ServicePoint servicePoint)
 {           
     try {
         Debug.Assert(servicePoint != null, "no ServicePoint provided by SmtpClient");
         // check to see if we have a different connection than last time
         UpdateServicePoint(servicePoint);
         connection = new SmtpConnection(this, client, credentials, authenticationModules);
         connection.Timeout = timeout;
         if(Logging.On)Logging.Associate(Logging.Web, this, connection);
         
         if (EnableSsl)
         {
             connection.EnableSsl = true;
             connection.ClientCertificates = ClientCertificates;
         }
         connection.GetConnection(servicePoint);
     }
     finally {
         
     }
 }
예제 #5
0
        internal void GetConnection(string host, int port)
        {
            try
            {
                _connection = new SmtpConnection(this, _client, _credentials, _authenticationModules);
                _connection.Timeout = _timeout;
                if (MailEventSource.Log.IsEnabled()) MailEventSource.Log.Associate(this, _connection);

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

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