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
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