How to activate email in Heroku for Devise to reset password

1

Hello, someone has experience parameterizing rails for the production environment (heroku)? I am trying to send mails with Devise to reset the users password when it is required. I found an article that suggests the change of 2 parameters:

- config.action_mailer.default_url_options = { host: 'http://your-app-on-heroku.herokuapp.com' }
- config.mailer_sender = '[email protected]'

I made the changes in my Rails application but still send the mail to the log as in the test environment:

2018-10-12T14:23:27.949473+00:00 app[web.1]: From: [email protected]
2018-10-12T14:23:27.949475+00:00 app[web.1]: Reply-To: [email protected]
2018-10-12T14:23:27.949476+00:00 app[web.1]: To: [email protected]
2018-10-12T14:23:27.949478+00:00 app[web.1]: Message-ID: <5bc0ae5fe73bd_42ab51090f82c627c4@57555215-feb3-43fd-aaa7-b57dc06720ed.mail>
2018-10-12T14:23:27.949479+00:00 app[web.1]: Subject: Reset password instructions
2018-10-12T14:23:27.949481+00:00 app[web.1]: Mime-Version: 1.0
2018-10-12T14:23:27.949482+00:00 app[web.1]: Content-Type: text/html;
2018-10-12T14:23:27.949484+00:00 app[web.1]: charset=UTF-8
2018-10-12T14:23:27.949485+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2018-10-12T14:23:27.949486+00:00 app[web.1]: 
2018-10-12T14:23:27.949487+00:00 app[web.1]: <p>Hello [email protected]!</p>
2018-10-12T14:23:27.949488+00:00 app[web.1]: 
2018-10-12T14:23:27.949490+00:00 app[web.1]: <p>Someone has requested a link to change your password. You can do this through the link below.</p>
2018-10-12T14:23:27.949491+00:00 app[web.1]: 
2018-10-12T14:23:27.949493+00:00 app[web.1]: <p><a href="http://harm-reduction-tracker.herokuapp.com//users/password/edit?reset_password_token=EtsN8sP4orWeUsr3bnjM">Change my password</a></p>
2018-10-12T14:23:27.949494+00:00 app[web.1]: 
2018-10-12T14:23:27.949495+00:00 app[web.1]: <p>If you didn't request this, please ignore this email.</p>
2018-10-12T14:23:27.949497+00:00 app[web.1]: <p>Your password won't change until you access the link above and create a new one.</p>
    
asked by Laura 12.10.2018 в 17:59
source

0 answers