Ruby Net::SMTP Functions
EditRocket provides the following information on Net::SMTP functions in the Ruby source code builder.
default_port() - The default SMTP port, port 25.
esmtp=( bool ) - "Set whether to use ESMTP or not. This should be done before calling #start. Note that if #start is called in ESMTP mode, and the connection fails due to a ProtocolError, the SMTP object will automatically switch to plain SMTP mode and retry (but not vice versa)."
esmtp?() - true if the SMTP object uses ESMTP (which it does by default).
esmtp() - "Alias for #esmtp?"
finish() - Finishes the SMTP session and closes TCP connection. Raises IOError if not started.
inspect() - Provide human-readable stringification of class state.
new( address, port = nil ) - Creates a new Net::SMTP object.
open_message_stream( from_addr, *to_addrs ) - "Opens a message writer stream and gives it to the block. The stream is valid only in the block, and has these methods:"
read_timeout=( sec ) - Set the number of seconds to wait until timing-out a read(2) call.
ready( from_addr, *to_addrs ) - "Alias for #open_message_stream"
send_mail( msgstr, from_addr, *to_addrs ) - "Alias for #send_message"
send_message( msgstr, from_addr, *to_addrs ) - Sends msgstr as a message. Single CR ("\r") and LF ("\n") found in the msgstr, are converted into the CR LF pair. You cannot send a binary message with this method. msgstr should include both the message headers and body.
sendmail( msgstr, from_addr, *to_addrs ) - "Alias for #send_message"
set_debug_output( arg ) - "WARNING: This method causes serious security holes. Use this method for only debugging."
start( address, port = nil, helo = 'localhost.localdomain', user = nil, secret = nil, authtype = nil) - Creates a new Net::SMTP object and connects to the server.
start( address, port = nil, helo = 'localhost.localdomain', user = nil, secret = nil, authtype = nil) - Creates a new Net::SMTP object and connects to the server.
started?() - true if the SMTP session has been started.