Problem does not send Confirmation Email and Password Change
Problem
After requesting the submission of forget password?
it will load until giving time out
.
Thecreationofthetokenforpasswordexchangeisgeneratedcorrectly,accessingtheexchangelinkitworksandeditscorrectly.Buttheemailisnotbeingsent.
Config/environments/development.rbRails.application.configuredo#Settingsspecifiedherewilltakeprecedenceoverthoseinconfig/application.rb.#Inthedevelopmentenvironmentyourapplication'scodeisreloadedon#everyrequest.Thisslowsdownresponsetimebutisperfectfordevelopment#sinceyoudon'thavetorestartthewebserverwhenyoumakecodechanges.config.cache_classes=false#Donoteagerloadcodeonboot.config.eager_load=false#Showfullerrorreportsanddisablecaching.config.consider_all_requests_local=trueconfig.action_controller.perform_caching=false#Don'tcareifthemailercan'tsend.config.action_mailer.raise_delivery_errors=true#PrintdeprecationnoticestotheRailslogger.config.active_support.deprecation=:log#Raiseanerroronpageloadiftherearependingmigrations.config.active_record.migration_error=:page_load#Debugmodedisablesconcatenationandpreprocessingofassets.#Thisoptionmaycausesignificantdelaysinviewrenderingwithalarge#numberofcomplexassets.config.assets.debug=true#Addsadditionalerrorcheckingwhenservingassetsatruntime.#Checksforimproperlydeclaredsprocketsdependencies.#Raiseshelpfulerrormessages.config.assets.raise_runtime_errors=true#Raiseserrorformissingtranslations#config.action_view.raise_on_missing_translations=true#Mailconfigurationconfig.action_mailer.default_url_options={:host=>'localhost:5000'}config.action_mailer.delivery_method=:smtp#Apenasaltereiosdadosdedomain,user_nameepasswordporsegurançaconfig.action_mailer.smtp_settings={:address=>"smtp.gmail.com",
:por => 587,
:domain => 'mydomain.com.br',
:user_name => '[email protected]',
:password => 'mypassword',
:authentication => 'plain',
:enable_starttls_auto => true
}
end
For a better view: Gist
Error log
Completed 500 Internal Server Error in 30414ms
If anyone has been through something similar leave your answer. Thanks
Solution for Forget Password
With the syntax that was before it was not configuring smtp. Now it's like this
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: 'localhost',
user_name: '[email protected]',
password: 'myPass',
authentication: 'plain',
enable_starttls_auto: true
}