邮件加入日志

memcached_alan
guange 10 years ago
parent aeec0d1d9c
commit dbccf9034d

@ -143,7 +143,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
@ -818,11 +818,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)
@ -877,7 +878,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)

Loading…
Cancel
Save