Another try to fix the mail
This commit is contained in:
parent
1430de432e
commit
8e994fd881
1 changed files with 16 additions and 15 deletions
31
config.ru
31
config.ru
|
@ -17,21 +17,22 @@ class MyMain < Rack::TryStatic
|
||||||
def call(env)
|
def call(env)
|
||||||
request = Rack::Request.new(env)
|
request = Rack::Request.new(env)
|
||||||
if request.path == "/contact" and request.post?
|
if request.path == "/contact" and request.post?
|
||||||
Pony.mail( :to => "yann.esposito@gmail.com",
|
Pony.mail(
|
||||||
:from => request[:mail],
|
:from => request[:name] + '<' + request[:mail] +'>',
|
||||||
:subject => 'YPassword support',
|
:to => "yann.esposito@gmail.com",
|
||||||
:body => request[:body],
|
:subject => 'YPassword support',
|
||||||
:port => '587',
|
:body => request[:body],
|
||||||
:via => 'smtp',
|
:port => '587',
|
||||||
:via_options => {
|
:via => :smtp,
|
||||||
:address => 'smtp.sendgrid.net',
|
:via_options => {
|
||||||
:port => '587',
|
:address => 'smtp.sendgrid.net',
|
||||||
:enable_starttls_auto => true,
|
:port => '587',
|
||||||
:user_name => ENV['SENDGRID_USERNAME'],
|
:enable_starttls_auto => true,
|
||||||
:password => ENV['SENDGRID_PASSWORD'],
|
:user_name => ENV['SENDGRID_USERNAME'],
|
||||||
:authentification => :plain,
|
:password => ENV['SENDGRID_PASSWORD'],
|
||||||
:domain => ENV['SENDGRID_DOMAIN'],
|
:authentification => :plain,
|
||||||
})
|
:domain => ENV['SENDGRID_DOMAIN'],
|
||||||
|
})
|
||||||
return [200, {
|
return [200, {
|
||||||
"Last-Modified" => File.mtime($mailFile).httpdate,
|
"Last-Modified" => File.mtime($mailFile).httpdate,
|
||||||
"Content-Type" => "text/html",
|
"Content-Type" => "text/html",
|
||||||
|
|
Loading…
Reference in a new issue