-
-
Save stefanobernardi/1920719 to your computer and use it in GitHub Desktop.
Async Emails With Sorcery by delayed_job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/initializers/sorcery_async_email.rb | |
module Sorcery | |
module InstanceMethods | |
def generic_send_email(method, mailer) | |
config = sorcery_config | |
config.send(mailer).delay.send(config.send(method),self) | |
end | |
end | |
end | |
end |
Hey Kristijan, yeah this doesn't work.
Check this out:
http://stefanobernardi.com/post/18403560471/sorcery-delayed-job-asynchronous-email
You need to override the methods and then change the delivery Mailer for
the password reset one. (can't change the delivery Mailer for the other
emails as it's stated unfortunately).
-Ste
…On Thu, Apr 19, 2012 at 12:37 PM, Kristijan < ***@***.*** > wrote:
Hey... I still see errors when executing `rake jobs:work` (try adding
delayed mail into it over sorcery):
`Class#superclass failed with NoMethodError: undefined method`deliver'
for ActionMailer::Base:Class - 0 failed attempts`
The mail is sent but with this error.
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1920719
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey... I still see errors when executing
rake jobs:work
(try adding delayed mail into it over sorcery):Class#superclass failed with NoMethodError: undefined method
deliver' for ActionMailer::Base:Class - 0 failed attempts`The mail is sent but with this error.