Created
May 5, 2009 06:23
-
-
Save danmayer/106855 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'tlsmail' | |
require 'time' | |
content = <<EOF | |
From: cruise@devver.net | |
To: contact@devver.net | |
Subject: Hello! | |
Date: #{Time.now.rfc2822} | |
How are you. | |
EOF | |
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE) | |
Net::SMTP.start('smtp.gmail.com', 587, 'gmail.com', 'cruise@devver.net', 'PASSWORD', :login) do |smtp| | |
smtp.send_message(content, 'cruise@devver.net', 'contact@devver.net') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment