From 617feb457e8816187493d7eca2deca95ab1dd91b Mon Sep 17 00:00:00 2001 From: Skud Date: Sat, 6 Oct 2012 13:32:24 +0100 Subject: [PATCH 1/2] Make email work in production --- app/views/devise/mailer/confirmation_instructions.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/devise/mailer/confirmation_instructions.html.haml b/app/views/devise/mailer/confirmation_instructions.html.haml index a930f430a..18689db65 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.haml +++ b/app/views/devise/mailer/confirmation_instructions.html.haml @@ -5,4 +5,5 @@ %p You can confirm your account email through the link below: -%p = link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) +%p + = link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) From 8916b917916027e2ad786d56b59b65587c31cb8a Mon Sep 17 00:00:00 2001 From: Skud Date: Sat, 6 Oct 2012 13:46:09 +0100 Subject: [PATCH 2/2] This sends mail correctly on the server, using sendmail. --- config/application.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/application.rb b/config/application.rb index 2878ebc0b..d85d8b9cc 100644 --- a/config/application.rb +++ b/config/application.rb @@ -66,5 +66,13 @@ module Growstuff g.template_engine :haml g.stylesheets false end + + config.action_mailer.delivery_method = :sendmail + config.action_mailer.sendmail_settings = { + :location => '/usr/sbin/sendmail', + :arguments => '-i -t', + :openssl_verify_mode => 'none' + } + end end