Another try to fix the mail
This commit is contained in:
parent
1430de432e
commit
8e994fd881
1 changed files with 16 additions and 15 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue