Another try to fix the mail

This commit is contained in:
Yann Esposito (Yogsototh) 2011-05-12 22:55:37 +02:00
parent 1430de432e
commit 8e994fd881

View file

@ -17,12 +17,13 @@ class MyMain < Rack::TryStatic
def call(env)
request = Rack::Request.new(env)
if request.path == "/contact" and request.post?
Pony.mail( :to => "yann.esposito@gmail.com",
:from => request[:mail],
Pony.mail(
:from => request[:name] + '<' + request[:mail] +'>',
:to => "yann.esposito@gmail.com",
:subject => 'YPassword support',
:body => request[:body],
:port => '587',
:via => 'smtp',
:via => :smtp,
:via_options => {
:address => 'smtp.sendgrid.net',
:port => '587',