I\'m fairly new to rails and trying to figure things out. I recently got a mailer all setup and it was working fine. But I am trying to add a second mailer for user actions
When users sign up with Devise, they don't go through the UsersController.
You might want to add the mail sending code in the User model.
For example, in app/models/user.rb:
class User < ActiveRecord::Base
# ...
after_create :send_admin_mail
def send_admin_mail
UserMailer.send_new_user_message(self).deliver
end
# ...
end
This is done by utilizing the Active Record after_create callback.