Created
October 27, 2010 07:30
-
-
Save pedrodelgallego/648619 to your computer and use it in GitHub Desktop.
A working example of pony and sinatra.
This file contains hidden or 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
# You need to install these gems. | |
# - smtp_tls | |
# - pony | |
post "/contact-us" do | |
Pony.mail :to => '[email protected]', | |
:from => "#{params[:email]}", | |
:subject => "Contact SFT : #{params[:name]}", | |
:body=> "#{params[:body]}, --- Contact Address #{params[:email]}", | |
:via => :smtp, | |
:smtp => { | |
:host => 'smtp.gmail.com', | |
:port => '587', | |
:tls => true, | |
:user => 'pedro.delgallego', | |
:password => 'your-gmail-password', | |
:auth => :plain, | |
:domain => "your-domain." | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment