0
votes

I have just started learning ruby on rails and this was one of the tutorials i followed:

http://railscasts.com/episodes/206-action-mailer-in-rails-3

I followed it to a T and I have yet to receive anything in my gmail account. Is it fair to assume some updates to ruby have changed how you do things?

My best guess from reading everything over the net, the tutorial is missing actually setting the mailer to use smtp setting.

Here are my smtp settings:

ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com",

:port => 587,

:domain => "alexei.herokuapp.com",

:user_name => "mygmailaccount",

:password => "mygmailpassword",

:authentication => "plain"

:enable_starttls_auto => true }

Could it be that i am still in local environment when testing this?

1
are there any errors in the Rails log?x1a4

1 Answers

1
votes

In that Railscast, Ryan has a line in there that doesn't send any email in development:

Mail.register_interceptor(DevelopmentMailInterceptor) if Rails.env.development?

Did you put that in? If so, then no email will go out when you run your app locally in development.

Try removing it.

Also open myapp/logs/development.log to see if what shows up there when you try to send an email.