resque_mailer icon indicating copy to clipboard operation
resque_mailer copied to clipboard

How get smtp settings in error handler?

Open sunnmas opened this issue 7 years ago • 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?

sunnmas avatar Aug 30 '18 16:08 sunnmas

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

francois-ferrandis avatar Nov 29 '20 17:11 francois-ferrandis