rails / activejob

Declare job classes that can be run by a variety of queueing backends
743 stars 47 forks source link

4.2.0.rc2 NoMethodError Exception: undefined method `deliver_now' for #<Mail::Message:0xfbcfef8> #110

Closed Leooo closed 9 years ago

Leooo commented 9 years ago

Hello, when I create a #Mail::Message in my Mailer class, and call "deliver_now!" outside of the class the mail is sent, but when I have a method in my Mailer class to send emails I have an error message:

class Mailer < ActionMailer::Base def send_email .. mail(from:..).deliver_now! end end

=> NoMethodError Exception: undefined method `deliver_now' for #Mail::Message:0xfbcfef8

Is these an include possible in my Mailer class to allow it to send emails with deliver_now/deliver_later?

If not I can send my mails outside the class, but it used to work for my Mailer before ActiveJobs

Thanks

Leooo commented 9 years ago

Didnt see the main Rails issue queue. Posting there if needed thanks.