Rails 4, how to correctly configure smtp settings (gmail)

You have to set the domain correctly. Currently in the code posted its “mydomain.net”. Change it to gmail.com if you want to sent it via gmail.

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)