Can not send email by Mailer Rails -


i have tried configure tutorials still can not send email. @ console, displays image below:

enter image description here

i have configured in config file \ environments \ development.rb , production.rb follows:

config.active_record.dump_schema_after_migration = false   config.action_mailer.raise_delivery_errors = true   config.action_mailer.delivery_method = :smtp   config.action_mailer.smtp_settings = {     address:              'smtp.gmail.com',     port:                 587,     domain:               'gmail.com',     user_name:            'gmail username',     password:             'password',     authentication:       'plain',     enable_starttls_auto: true  } 

app\mailers\user_mailer.rb:

class usermailer < applicationmailer    def registration_confirmation(user)     mail(:to => user.email,:subject => "registered")   end end 

app\mailers\application_mailer.rb

class applicationmailer < actionmailer::base   default from: "testonebig@gmail.com"   layout 'mailer' end 

app\controllers\users_controller.rb

def create     @user = user.new(user_params)     usermailer.registration_confirmation(@user).deliver     respond_to |format|       if @user.save          format.html { redirect_to @user, notice: 'user created.' }         format.json { render :show, status: :created, location: @user }       else         format.html { render :new }         format.json { render json: @user.errors, status: :unprocessable_entity }       end     end   end 

it runs without mistakes have been displayed when checked gmail, it's not receive mail.

are providing correct email , password in development.rb file?

one more thing: sending email id "testonebig@gmail.com", please login email in gmail. make sure ok account. may kind of issue in authentication account.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -