zapnap/resque_mailer

How get smtp settings in error handler?

sunnmas opened this issue · 1 comments

Resque::Mailer.error_handler = lambda { |mailer, message, error, action, args|
if error.is_a?(Resque::TermException)
Resque.enqueue(mailer, action, *args)
else
SMS.send_error :admin, {error: error.message, error_class: error.class, smtp_login: ????, smtp_pass: ????}
raise error
end

Hi, I need get smtp settings here (not default), but which setted at delivery_method_options parameter when mail method invoke. Can I do this?

Have you tried looking at the value of message.delivery_method.settings?