0

I am using devise which is sending confirmation email. I am not sure what it is doing, but I can see in the output of 'rails s' that mail is sent to correct emails.

config/environments/development.rb:

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: 'localhost:3000',
  username: 'email@gmail.com',
  password: 'pwd',
  authentication: 'plain',
  enable_starttls_auto: true
}

I have seen many stackoverflow questions but everything showing this config only and this is not workng for me .

user2139745
  • 1,721
  • 4
  • 19
  • 30
  • not sure if this will help, but give it a try: http://stackoverflow.com/a/18742821/2128691 – dax Sep 14 '13 at 14:19

1 Answers1

1

Its user_name but not username. Observer the underscore.

Also note that, domain is 'optional', so you can remove it.

And, set this (false by default):

config.action_mailer.raise_delivery_errors = true

if you want to see delivery errors

user1305989
  • 3,231
  • 3
  • 27
  • 34