I am sure they have asked this millions of times, but I can’t find anything that works for me, so I ask again!
I just need a way to send emails using ActionMailer in rails 3. I followed numerous tutorials, including the Railscasts tutorial on the new ActionMailer, and I can see the emails created, but I don’t receive them.
I tried a bunch of different ways, but they usually come down to setting the following options
ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => "587", :domain => "gmail.com", :user_name => "xxx@gmail.com", :password => "yyy", :authentication => "plain", :enable_starttls_auto => true }
I tried the above code (with valid gmail data, of course) in my config / environment.rb, config / environment / development.rb and currently have it in my own initializer config / initialisers / setup_mail.rb
I also tried with several different SMTP servers, including Gmail and Sendgrid, respectively setting smtp options, but still nothing. I can see the mail in the terminal and the development log and what it is.
Does anyone know of any other error that I might have missed that I need to configure for ActionMailer? Otherwise, is there a way to get more information about why emails are not sent? I have
config.action_mailer.raise_delivery_errors = true
in my config / development.rb, but the development log still shows the same thing as in the terminal.
For what it's worth, I'm developing a Ubuntu 10.04 laptop in case you need some kind of specific setup for this.
Thank you very much
ruby-on-rails ruby-on-rails-3 actionmailer
Addsy Nov 30 '10 at 11:23 2010-11-30 11:23
source share