Nikhil Sharma


50 Experience
0 Lessons Completed
0 Questions Solved


Posted in Rails 4 ActionMailer Issue

I have created a rails app for booking cabs online. I want my app to have the functionality of sending emails to users once their booking is confirmed. For this, I am following Ryan Bates railscasts:

I started with creating a setup_mail.rb file in app/config/initializers, with the following content:

ActionMailer::Base.smtp_settings = {
:address => "",
:port => 587,
:domain => "",
:user_name => "taxibol",
:password => "secret",
:authentication => "plain",
:enable_starttls_auto => true
I then generated a mailer named user_mailer and included the following in app/mailers/user_mailer.rb:
class UserMailer < ActionMailer::Base
default :from => ""
def registration_confirmation(user)
mail(:to =>, :subject => "Registered")
and the following in app/views/user_mailer/registration_confirmation.text.erb:

Again got the same log trails, but no mail yet