class Net::SMTP

def enable_starttls_auto(context = nil)

+context+ is a OpenSSL::SSL::SSLContext object.
Enables SMTP/TLS (STARTTLS) for this object if server accepts.
def enable_starttls_auto(context = nil)
  raise 'openssl library not installed' unless defined?(OpenSSL::VERSION)
  raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @tls
  @starttls = :auto
  @ssl_context_starttls = context
end