Returns supported authentication methods on this server. You cannot get valid value before opening SMTP
session.
Opens a message writer stream and gives it to the block. The stream is valid only in the block, and has these methods:
outputs STR and CR LF.
outputs STR.
outputs sprintf(fmt,*args).
outputs STR and returns the length of written bytes.
outputs STR and returns self.
If a single CR (“r”) or LF (“n”) is found in the message, it is converted to the CR LF pair. You cannot send a binary message with this method.
from_addr
is a String representing the source mail address.
to_addr
is a String or Strings or Array of Strings, representing the destination mail address or addresses.
Net::SMTP.start('smtp.example.com', 25) do |smtp| smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f| f.puts 'From: from@example.com' f.puts 'To: dest@example.com' f.puts 'Subject: test message' f.puts f.puts 'This is a test message.' end end
This method may raise:
Creates an option parser and fills it in with the help info for the command.
True if the gems in the system satisfy dependency
.
define methodname as instance method of current module, using ERB
object or eRuby file
define methodname as instance method of current module, using ERB
object or eRuby file
This method is used inside of several different objects to determine if special behavior is needed in the constructor.
Special behavior is needed if the array passed in as args
has true
or false
as its value, and if the second element of args
is a hash.
Parses form data in io
with the given boundary
Parses form data in io
with the given boundary
Validates the Diffie-Hellman parameters associated with this instance. It checks whether a safe prime and a suitable generator are used. If this is not the case, false
is returned.
Sets the parameters for this SSL
context to the values in params
. The keys in params
must be assignment methods on SSLContext
.
If the verify_mode
is not VERIFY_NONE and ca_file
, ca_path
and cert_store
are not set then the system default certificate store is used.