我正在使用延迟作业发送电子邮件,因为我正在使用此方法 UserMailer.delay.send_mail_to_user。
But I am getting the following error :
stack level too deep .
When i did full trace i found following issue :
actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:70
Hence i am not able to send email through background.please help
谢谢
控制器代码:
UserMailer.delay.send_mail_to_user
redirect_to :back
邮件代码:
class UserMailer < ActionMailer::Base
def send_mail_to_user
mail(:from =>CONFIG['smtp_settings']['username'],
:to => 'sanjay.salunkhe@raweng.com',
:subject => 'test' )
end
end
我也将以下单行作为回溯
actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:70