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 { } }
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 { } }
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 { } }
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 { } }