sorcery
sorcery copied to clipboard
deliver_reset_password_instructions! doesn't actually send the email
deliver_reset_password_instructions! doesn't actually send the email, I have to specify this with the .deliver or .deliver_now command in my mailer action.
Running on Rails 4.2.2
Hi @adiakritos,
do you mean that deliver_reset_password_instructions returns email object, on which you have to call deliver method? Or simply this method does not work and returns false?
is it because you trigger the deliver too frequently? in the config, there is:
hammering protection, how long in seconds to wait before allowing another email to be sent.
Default:
5 * 60user.reset_password_time_between_emails =
It might be the hammering protection, but I also found that any exception that occurs in the mailer (UserMailer by default) will be ignored by default in Rails' development environment.
To find the exception, set this in config/environments/development.rb:
config.action_mailer.raise_delivery_errors = true
Now you should get information about the exception.
I recommend committing this, so that it acts like production.