Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How get smtp settings in error handler? #107

Open
sunnmas opened this issue Aug 30, 2018 · 1 comment
Open

How get smtp settings in error handler? #107

sunnmas opened this issue Aug 30, 2018 · 1 comment

Comments

@sunnmas
Copy link

sunnmas commented Aug 30, 2018

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?

@francois-ferrandis
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants