Skip to content

Instantly share code, notes, and snippets.

@jpoz
Created September 2, 2009 21:38
Show Gist options
  • Save jpoz/179978 to your computer and use it in GitHub Desktop.
Save jpoz/179978 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'pony_gmail' # the file that's linked above
post '/' do
Pony.mail(:to=>"someeamil@example.com",
:from => 'yourgmail@yourdomian.com',
:subject=> "SUBJECT",
:body => "BODY",
:via => :smtp, :smtp => {
:host => 'smtp.gmail.com',
:port => '587',
:user => 'yourgmail@yourdomian.com',
:password => 'pazzword',
:auth => :plain,
:domain => "yourdomian.com"
}
)
"Email sent!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment