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
on 2011-04-12 00:12
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.