Skip to content

Instantly share code, notes, and snippets.

@dpick
Created December 22, 2010 02:41
Show Gist options
  • Save dpick/751004 to your computer and use it in GitHub Desktop.
Save dpick/751004 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'pony'
get '/' do
Pony.mail(:to => 'pickdp@rose-hulman.edu',
:from => ENV['SENDGRID_USERNAME'],
:subject => 'xyzpqrst',
:body => 'test',
:via => :smtp, :via_options => {
:address => 'smtp.sendgrid.net',
:port => '25',
:authentication => :plain, # :plain, :login, :cram_md5, no auth by default
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => ENV['SENDGRID_DOMAIN']
})
return "sending email"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment