tesing email mod for url

This commit is contained in:
wmcheng 2019-09-02 04:37:07 +08:00
parent 54282a4d8d
commit 9ae9f79e8e
1 changed files with 1 additions and 1 deletions

View File

@ -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