Forum: Ruby on Rails Action mailer Problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C92d95af75a4c4116cdbd904c915d0f1?d=identicon&s=25 sssagar (Guest)
on 2011-04-12 00:12
(Received via mailing list)
Hello,

  This is my users controller create method.

 def create
     @user = User.new(params[:user])
     if @user.save
  UserMailer.welcome_email(@user).deliver
        flash[:success] = "Please check your mail to activate your
account"
        redirect_to root_path
     else
        @title = "Sign up"
        render 'new'
     end

  end

but it is not sending any mail when i create a new user. but it is
creating flash message.

If i use UserMailer.welcome_email(@user).deliver in rails console it
is working fine.

am i missing anything ?? I am using gmail SMTP.

Please help me out.

Thanks,
Sagar
This topic is locked and can not be replied to.