Class: Mail::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed_job_extras/action_mailer_rails3.rb

Defined Under Namespace

Classes: MailmanWorker

Instance Method Summary collapse

Instance Method Details

#deliver_with_workerObject



15
16
17
18
19
20
21
22
# File 'lib/delayed_job_extras/action_mailer_rails3.rb', line 15

def deliver_with_worker
  if ActionMailer::Base.delivery_method == :test
    deliver_without_worker
  else
    Mail::Message::MailmanWorker.enqueue(:mail => Marshal.dump(self))
    return self
  end
end