ruby on rails - Delayed_job background process not sending mails while executing mail related code with delay option -
while executing mail related code asynchronously using delay method of delayed_job, executing didn't mail. getting following o/p in jobs:work rake task console
[worker(host:ip-0aasdf pid:3512)] starting job worker [worker(host:ip-0aasdf pid:3512)] usermailer.deliver_author_notification completed after 0.4850 [worker(host:ip-0aasdf pid:3512)] 1 jobs processed @ 1.3072 j/s, 0 failed ... i have following code
usermailer.delay.deliver_author_notification(self,nfication) i using rails 2.3.5 , delayed_job 2.0.8 version.
please me on this. in advanced....
user_mailer.rb contains following code:
class usermailer < actionmailer::base def author_notification(user,nfication) @recipients = user.creator.email @site_url = get_site_url(user.creator.organization) @from = "admin@#{@site_url}" @body[:body_template] = eval('"'+nfication.body+'"') @subject = eval('"'+nfication.subject+'"') content_type "text/html" end end
Comments
Post a Comment