Merge branch 'guange_dev' into szzh

This commit is contained in:
sw 2015-04-30 11:23:19 +08:00
commit 4088d134df
1 changed files with 9 additions and 4 deletions

View File

@ -166,7 +166,7 @@ class Mailer < ActionMailer::Base
@course_journal_messages,@user_journal_messages,@forums,@memos,@attachments,@bids].any? {|o|
!o.empty?
}
binding.pry if Rails.env.development?
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
#有内容才发,没有不发
mail :to => user.mail,:subject => subject if has_content
end
@ -841,11 +841,12 @@ class Mailer < ActionMailer::Base
end
set_language_if_valid @initial_language
super headers do |format|
m = super headers do |format|
format.text
format.html unless Setting.plain_text_mail?
end
mylogger.debug "Sent a mail from #{m.from} to [#{m.to},#{m.cc}, #{m.bcc if Setting.bcc_recipients?}] subject: #{m.subject}"
m
end
def initialize(*args)
@ -900,7 +901,11 @@ class Mailer < ActionMailer::Base
end
def mylogger
Rails.logger
if Setting.delayjob_enabled?
Delayed::Worker.logger
else
Rails.logger
end
end
def add_attachments(obj)