0

I am developing Rails 3 application where email sending failed due to error EOFError in Production.

My email setting below:

config.action_mailer.delivery_method = :smtp
 config.action_mailer.smtp_settings = {
    :address              => "smtp.gmail.com",
    :port                 => 587,
    :domain               => "gmail.com",
    :user_name            => "[email protected]",
    :password             => "passwor",
    :authentication       => :plain,
    :enable_starttls_auto => true,
    :tls                  => true
  }

I tried lot but not getting any solutions.

Any one ?

Thanks

3 Answers 3

0

Your development.rb should look like :

config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp

    config.action_mailer.smtp_settings = {
      address:              'smtp.gmail.com',
      port:                 '587',
      domain:               'gmail.com',
      user_name:            '[email protected]',
      password:             'xxxxxx',
      authentication:       'login',
      enable_starttls_auto: true  
    }

There should be login in place of plain in authentication.

I hope this solves your error.

0
rm tmp/cache/*

Run above command from your rails project directory and try to send mail

1
  • Nothing in cache folder. any other way? Nov 26, 2015 at 10:40
0

I had the same issue on Heroku and it was definitely linked to credentials - I was reading in environment variables and they had not been set. Once I created them on Heroku, everything worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.