Alex
Alex

Reputation: 463

How can I send a registration confirmation email with devise

I'm building a rails3 application (hosted on Heroku) and I'm using devise for user authentication. I would like to send a confirmation email every time a new user signs up to my app, that is confirming that he has successfully signed up etc.

Note: I do not want to confirm his email address, i.e. I dont want to use the :confirmable devise module.

Problem is, I cannot find any relevant devise or user controller action to add a mailer .deliver action.

Thanks for your help!

Upvotes: 1

Views: 436

Answers (1)

craig.kaminsky
craig.kaminsky

Reputation: 5598

How about firing it off from your model (user.rb)?

#user.rb
after_create :some_method
def some_method
  YourMailerObject.deliver_some_message()
end 

Upvotes: 3

Related Questions