class Net::SMTP

def enable_starttls(context = nil)

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