0

It's a little bit confusing since every people say it's going on a different place of the application.

I'have been testing but with no luck.

So, whereś the right place for it?

  1. config/environment.rb?
  2. config/application.rb?
  3. config/environments/production.rb?
  4. config/initializers/anymodelname.rb?

This is what I have been testing on several places.

ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :user_name => "[email protected]", :password => 'password', :authentication => "plain", :enable_starttls_auto => true }

2
  • guides.rubyonrails.org/… suggests putting it in the config/environments/$RAILS_ENV.rb file so config/environments/production.rb would be the place to put it. When you say it does not work what errors are you getting? Commented Mar 12, 2012 at 17:35
  • @ScottJShea the problem is that the Gmail is actually seems to be 'blocking' certain accounts from use their address, like I was trying to do with my own email account from my domain, just trying to use the 'smtp.gmail.com`. After creating a gmail account and replacing, it is working now. Commented Mar 13, 2012 at 0:09

1 Answer 1

0

Strange but seems that Google are only allowing Gmail accounts to use with their servers, I have just to create a new Gmail account and it works with no kind of special settings.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.