Rails 3.1.3
I have followed the RailsCast ActionMailer.
http://railscasts.com/episodes/206-action-mailer-in-rails-3
Around 5minutes, Ryan succeeds in sending mails, but I don't.
My setup_mail.rb
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:user_name => "[email protected]",
:password => "xxx",
:authentication => "plain",
:enable_starttls_auto => true
}
I added to users_controller.rb
UserMailer.registration_confirmation(@user).deliver
and user_mailer.rb
class UserMailer < ActionMailer::Base
default from: "[email protected]"
def registration_confirmation(user)
mail(:to => user.email, :subject => "Registered" )
end
end
and I prepared registration_confirmation.txt.erb
Could anyone find what's wrong with it ?
Thanks in advance.
soichi
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.