pjhyett (owner)

Revisions

gist: 11 Download_button fork
public
Public Clone URL: git://gist.github.com/11.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def send_email(from, from_alias, to, to_alias, subject, message)
  msg = <<END_OF_MESSAGE
From: #{from_alias} <#{from}>
To: #{to_alias} <#{to}>
Subject: #{subject}
#{message}
END_OF_MESSAGE
 
  Net::SMTP.start('localhost') do |smtp|
    smtp.send_message msg, from, to
  end
end