views:

102

answers:

1

Hi all,

I'm using devise to handle user authentication with my rails app. I'd like to allow my users to sign up and be instantly logged in and receive a confirmation email.

Devise has the Confirmable module which sends out an email but requires the user to open up their mail application, find the email and click a link which then leads them to the site again.

I'd like to just email the user a confirmation that they signed up and that's it.

Is there a way for devise to do this or do I need to resolve to handling ActionMailer myself (if so, is there a quick and non-complex example)?

Many thanks!
-Tony

A: 

I'm pretty new to devise and rails, but I have set it all up in may app (rails 2.3.5) and got it working in it's basic functionality. I'm guessing some advanced devise users may teach you a trick to handle this in devise, but I'm going to say that you could easily handle this in a controller action, using some plain rails ActionMailer coding...

Here's a link that I ran across that will show you the basic approach. At the end of the tutorial, they gather the email parts from a simple web page, but you should easily see how to use the class to do it in code.

http://www.tutorialspoint.com/ruby-on-rails/rails-send-email.htm

MattSlay
I ended up going with the default confirmable email options. Having a user confirm is a pain in the butt but it does reduce the amount of false accounts. Thank you for the answer though!
slythic