class Net::SMTP
def tcp_socket(address, port)
def tcp_socket(address, port) begin Socket.tcp address, port, nil, nil, connect_timeout: @open_timeout rescue Errno::ETIMEDOUT #raise Net:OpenTimeout instead for compatibility with previous versions raise Net::OpenTimeout, "Timeout to open TCP connection to "\ "#{address}:#{port} (exceeds #{@open_timeout} seconds)" end end