Devise - Confirmation email and Forget password? [email does not send]

0

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.rb
Rails.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

Development.log

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
  }
    
asked by anonymous 25.03.2015 / 18:40

1 answer

1

The error is in the gmail connection to SMTP.

Are you using a machine with internet access? Do not have firewall blocking?

    
25.03.2015 / 20:30