Drupal - Disable register email notification

If you look at the function _user_email_notify(), it checks the variable 'user_mail_' . $op . '_notify' if it should send an email or not. Assuming that you have disabled email confirmation (otherwise, disabling mail notifications would be weird ;)), the $op is 'register_no_approval_required'. So the full variable name is 'user_mail_register_no_approval_required_notify'.

There doesn't seem to be a User Interface for that variable. However, you can set it in your settings.php, adding the following line at the end of settings.php (probably inside sites/default).

$conf['user_mail_register_no_approval_required_notify'] = FALSE;

You can do the same for other mail notifications too; the other possible $op values are listed on the linked page.


You can use the Mailcontrol module.

It allows you to turn on/off any standard Drupal mail you wish right from the UI.

Have full control over the default mails sent by Drupal 7 out of the box.

Description

This small module extends original Drupal 7 account settings page with the ability to globally turn ON/OFF all standard mails. By default Drupal 7 provides no option to globally disable the following mails:

  • Welcome (new user created by administrator)
  • Welcome (awaiting approval)
  • Welcome (no approval required)
  • Password recovery

In Drupal 8, the the equivalent of the code given from Berdir for the settings.php file is the following one.

$config['user.settings']['notify.register_no_approval_required'] = FALSE;

Tags:

Users