L
L
l2p2014-02-23 19:45:46
Ruby on Rails
l2p, 2014-02-23 19:45:46

Can't complete the registration confirmation in the devise gem?

Hello,
I can't complete the registration confirmation in the devise gem.
Migration as in the documentation did, all the fields were added, and everything was also added to the User model.
After that, an error about SMTP came out and I started to fix it. I use Yandex and Cloudflare.
CloudFlare config:
@ mx.yandex.ru 10
If I go to Yandex mail, everything goes fine to another email. But then the question arose about setting up smtp in rails itself.
In application_controller.rb added:

ActionMailer::Base.smtp_settings = {
  :address              => 'smtp.yandex.ru',
  :port                 => 465,
  :domain               => '####domain',
  :user_name            => 'no-reply',
  :password             => '####password',
  :authentication       => 'plain'

But when registering, after entering the data, the page starts to load for a long time and then redirects to ####domain/users (404 Not Found).
The letter never arrived in the mail. Help fix.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanKiLL, 2014-02-23
@FanKiLL

Try adding to the hash
something like this:

config.action_mailer.smtp_settings = {
      address: 'smtp.gmail.com',
      port: 587,
      domain: '***************',
      user_name: '***************',
      password: '*******************',
      authentication: 'plain',
      enable_starttls_auto: true
}

I
Ivan Kryak, 2014-02-24
@sck_v

did you check perform_deliveries in the environment settings?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question