Couldn't get email using devise Rails -



Couldn't get email using devise Rails -

i implementing devise mailers application have done next steps:

in model:

class user < activerecord::base # include default devise modules. others available are: # :lockable, :timeoutable , :omniauthable devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable end

and added migrations of confirmation_token, confirmed_at, confirmation_sent_at

in devise.rb, added:

config.mailer_sender = 'example@gmail.com' config.mailer = 'devise::mailer'

in development.rb:

config.assets.raise_runtime_errors = true config.action_mailer.default_url_options = { :host => 'localhost:3000' } config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: 'smtp.gmail.com', port: 587, domain: 'gmail.com', authentication: :plain, user_name: 'example@gmail.com', password: 'example@123', enable_starttls_auto: true, openssl_verify_mode: 'none' }

all credentials fine. email not generated. in console getting mail service info , link..

my console:

sent mail service example@yahoo.com (2597.8ms) date: wed, 08 apr 2015 23:39:09 +0530 from: example@gmail.com reply-to: example@gmail.com to: example@yahoo.com message-id: <55256ec5ba47e_26f51d984dc117aa@itadmin-hp-pavilion-17-notebook-pc.mail> subject: reset password instructions mime-version: 1.0 content-type: text/html; charset=utf-8 content-transfer-encoding: 7bit <p>hello exmple@yahoo.com!</p> <p>someone has requested link alter password. can through link below.</p> <p><a href="http://localhost:3000/users/password/edit?reset_password_token=m5os3tbyhqrsraw4tttt">change password</a></p> <p>if didn't request this, please ignore email.</p> <p>your password won't alter until access link above , create new one.</p>

i haven't added devise passwords controller / registartion controllers.

what might me problem?

you have add together line of code in development.rb file:

config.action_mailer.delivery_method= :smtp

config.action_mailer.perform_deliveries= true

config.action_mailer.default_url_options = { :host => 'localhost:3000' }

actionmailer::base.smtp_settings = {

address: 'smtp.gmail.com',

port: 587,

:authentication => :plain,

user_name: "****@gmail.com",

password: "*****",

openssl_verify_mode: 'none' }

ruby-on-rails devise

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -