所有发邮件都新开线程

This commit is contained in:
yanxd 2014-04-24 18:25:01 +08:00
parent 14511c079a
commit 653fe6c1ea
1 changed files with 3 additions and 1 deletions

View File

@ -446,8 +446,10 @@ class Mailer < ActionMailer::Base
def self.deliver_mail(mail)
return false if mail.to.blank? && mail.cc.blank? && mail.bcc.blank?
Thread.new do
super
end
end
def self.method_missing(method, *args, &block)
if m = method.to_s.match(%r{^deliver_(.+)$})