sorcery icon indicating copy to clipboard operation
sorcery copied to clipboard

deliver_reset_password_instructions! doesn't actually send the email

Open adiakritos opened this issue 10 years ago • 3 comments

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

adiakritos avatar Jun 30 '15 02:06 adiakritos

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?

arnvald avatar Jul 07 '15 16:07 arnvald

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 * 60

user.reset_password_time_between_emails =

pake007 avatar Jun 30 '16 09:06 pake007

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.

RobinDaugherty avatar Aug 28 '17 17:08 RobinDaugherty