adding the minimalist version of mailer (using third party smtp-tls lib)

This commit is contained in:
Dan Buch 2011-08-08 21:00:48 -04:00
parent 15f962eec0
commit 4364327d94

View File

@ -0,0 +1,18 @@
require 'rubygems'
require 'net/smtp'
require 'smtp-tls'
body = <<EOM
To: daniel.buch+rubytest@gmail.com
From: daniel.buch@gmail.com
Subject: minimalist message
AHOY
EOM
Net::SMTP.start('smtp.gmail.com', 587, 'gmail.com',
'daniel.buch@gmail.com', STDIN.readline, :login) do |smtp|
smtp.send_message(body, 'daniel.buch@gmail.com',
'daniel.buch+rubytest@gmail.com')
end