This recipe explains how to send a customized e-mail notification to administrators when a new user registers on the website.
Create a new rule configuration and set the event to User | After saving new user account.
Add an action System | Send mail to all users of a role.
Select the role you want the e-mails to be sent to.
Enter the subject of the mail in the Value section under SUBJECT.
Enter the body of the e-mail in the MESSAGE | Value section.
In this rule configuration, we're telling Rules to act on new user registrations and send e-mail notifications to the site administrators when this event occurs. In the e-mail body we've used REPLACEMENT PATTERNS to display the new user's username, the date and time the account was created, and the site's name will be used as the signature.
While this example is very useful and easy to configure, site builders are advised to use it with care. It is not advised to use this action to send e-mails to a large number of users. Because every action is executed right after an event occurred, it can put a serious load on the server(s) and can cause the site to go down.