eMail to Administrator when a User Sign up

Skip to first unread message

Florian Wesseler

Apr 6, 2016, 7:27:53 AM4/6/16
to Devise
In my app, before users get to be active, I need an admin  (or one of them) to activate the account. The Requirement is, that the Admin / all Admins get an eMail Alert of this request. How can I implement this with devise?

matthew keable

Jul 17, 2016, 11:04:44 PM7/17/16
to Devise
This one is very easy. Just add a call to the mailer once a user is saved in the create action of your registrations controller (assuming that you're extending from Devise::RegistrationsController).

Follow this for a more thorough guide:

Note - you'll need to have an smtp server, and you'll need to set the credentials for that server in your config. So either build one yourself (bad idea), set it up with your gmail account, or use a Heroku add-on like MailTrap/MailGun.
Reply all
Reply to author
0 new messages