From 9ae9f79e8efe4ca7de3a6f87b7d298600f543ffe Mon Sep 17 00:00:00 2001 From: wmcheng Date: Mon, 2 Sep 2019 04:37:07 +0800 Subject: [PATCH] tesing email mod for url --- app/controllers/admin/e_paper_criterias_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/e_paper_criterias_controller.rb b/app/controllers/admin/e_paper_criterias_controller.rb index bd2a150..4b19b47 100644 --- a/app/controllers/admin/e_paper_criterias_controller.rb +++ b/app/controllers/admin/e_paper_criterias_controller.rb @@ -48,7 +48,7 @@ def initialize def send_test_email paper_criteria = PaperCriteria.find(params[:id]) page = Page.where(:module => "e_paper").first.url rescue "" - email = Email.new(:mail_subject => paper_criteria.sending_title, :mail_lang => :zh_tw, :template => "admin/e_paper_criterias/emailer", :template_data => {"paper" => paper_criteria, "page" => "http://" + request.host_with_port + page}, :mail_to => params[:email]) + email = Email.new(:mail_subject => paper_criteria.sending_title, :mail_lang => :zh_tw, :template => "admin/e_paper_criterias/emailer", :template_data => {"paper" => paper_criteria, "page" => "http://" + request.host_with_port + page, "siteurl" => "http://" + request.host_with_port }, :mail_to => params[:email]) email.deliver render :json => {"success" => true}.to_json end