Skip to content

Instantly share code, notes, and snippets.

@cristibalan
Created January 23, 2010 03:11
Show Gist options
  • Save cristibalan/284403 to your computer and use it in GitHub Desktop.
Save cristibalan/284403 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'mail'
Mail.defaults do
smtp "smtp.gmail.com" do
port 587
enable_tls
user "yomomma@gmail.com"
pass "yomommasobig"
helo "localhost.localdomain"
end
end
mail = Mail.deliver do
from "yomomma@gmail.com"
to "yogranma@gmail.com"
subject "grr, sending mail sux!"
text_part do
body "some text"
end
html_part do
content_type 'text/html; charset=UTF-8'
body "<h1>some html title</h1><p>aaa</p><p>bbb</p>"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment