def send_message
      # Read the user's password from the persistent hash
      stored_password = @sender_info.transaction { @sender_info[:password] }
      # Initialize the gmail SMTP connection and upgrade to SSL/TLS
      smtp = Net::SMTP.new('smtp.gmail.com', 587)
      smtp.enable_starttls
      # Open SMTP connection, send message, close the connection
      smtp.start('gmail.com', @stored_from_address, stored_password, :login) do
        smtp.send_message(@msg, @_stored_from_address, @to_address)
      end
    end
def send_message
      # Read the user's password from the persistent hash
      stored_password = @sender_info.transaction { @sender_info[:password] }
      # Initialize the gmail SMTP connection and upgrade to SSL/TLS
      smtp = Net::SMTP.new('smtp.gmail.com', 587)
      smtp.enable_starttls
      # Open SMTP connection, send message, close the connection
      smtp.start('gmail.com', @stored_from_address, stored_password, :login) do
        smtp.send_message(@msg, @_stored_from_address, @to_address)
      end
    end
Open SMTP connection, pass user info as arguments, send message and close connection