Sending mail with Pony and Sinatra
问题 I am trying to send an email from a contact form (built in HTML) with the Pony Gem within sinatra, I have followed the docs but something must be missing. This is the Pony config get '/contact' do erb :contact, :layout => :layout end post '/contact' do require 'pony' Pony.mail({ :from => params[:name], :to => 'myemailaddress', :subject => params[:name] + "has contacted you via the Website", :body => params[:comment], :via => :smtp, :via_options => { :address => 'smtp.gmail.com', :port => '587