Method: Net::POP3#enable_ssl
- Defined in:
- lib/pop_ssl.rb
#enable_ssl(verify_or_params = {}, certs = nil, port = nil) ⇒ Object
call-seq:
Net::POP#enable_ssl(params = {})
Enables SSL for this instance. Must be called before the connection is established to have any effect. params[:port] is port to establish the SSL connection on; Defaults to 995. params (except :port) is passed to OpenSSL::SSLContext#set_params.
445 446 447 448 449 450 451 452 453 |
# File 'lib/pop_ssl.rb', line 445 def enable_ssl(verify_or_params = {}, certs = nil, port = nil) begin @ssl_params = verify_or_params.to_hash.dup @port = @ssl_params.delete(:port) || @port rescue NoMethodError @ssl_params = POP3.create_ssl_params(verify_or_params, certs) @port = port || @port end end |