new( address, port = nil )public
address is the hostname or ip address of your SMTP server. port is the port to connect to; it defaults to port 25.
This method does not open the TCP connection. You can use SMTP.start instead of SMTP.new if you want to do everything at once. Otherwise, follow SMTP.new with SMTP#start.
# File lib/net/smtp.rb, line 184 def initialize( address, port = nil ) @address = address @port = (port || SMTP.default_port) @esmtp = true @socket = nil @started = false @open_timeout = 30 @read_timeout = 60 @error_occured = false @debug_output = nil end