From c16d539205e0d5e0040cf0fd43bd5741558152ce Mon Sep 17 00:00:00 2001 From: Godwin Date: Sun, 27 Sep 2015 21:15:43 -0700 Subject: [PATCH] Another fix for emails --- app/mailers/user_mailer.rb | 3 ++- app/views/user_mailer/broadcast.html.haml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index b4784c1..848dcee 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -69,7 +69,8 @@ class UserMailer < ActionMailer::Base @content = content #@banner = (@host || 'http://localhost/') + (conference ? (conference.poster.preview.url || '') : image_url('logo.png')) if user && user.email - mail to: user.email, subject: "[#{conference ? conference.title : 'Bike!Bike!'}] #{subject}" + email = Rails.env == 'production' ? user.email : 'goodgodwin@hotmail.com' + mail to: email, subject: "[#{conference ? conference.title : 'Bike!Bike!'}] #{subject}" end end diff --git a/app/views/user_mailer/broadcast.html.haml b/app/views/user_mailer/broadcast.html.haml index 0463213..7ad27fd 100644 --- a/app/views/user_mailer/broadcast.html.haml +++ b/app/views/user_mailer/broadcast.html.haml @@ -1 +1 @@ -=markdown @content \ No newline at end of file +=markdown @content