tesing email mod for url
This commit is contained in:
parent
54282a4d8d
commit
9ae9f79e8e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue