Stopping non-Production environments from sending module update alerts

It is a best practice to keep your application's Drupal modules as up-to-date as possible. This is for many reasons, including helping to keep your application secure. An easy way to keep track of module updates is to configure Drupal to email you when new module updates are available on drupal.org.

If you enable this feature with your Acquia Cloud-hosted applications, you'll receive emails from each of your environments informing you of any module updates. This can result in three times as much email as you probably want about module updates. While you can disable this setting in each of the environments, the next time that you copy your Production database to Development or Staging, you'll start receiving these emails again because the setting is stored in the database.

Disabling update alert emails in an environment

To permanently disable this feature on any server other than Production, you can add the following code snippet to the end of your application's settings.php file:

if (isset($_ENV['AH_SITE_ENVIRONMENT']) && $_ENV['AH_SITE_ENVIRONMENT'] != 'prod') {
  $conf['update_notify_emails'] = array();
}

This forces the update_notify_emails setting to be empty for your non-Production environments, regardless of the setting in your application's database. When this setting is empty, Drupal will ignore the update emails functionality on all environments except for the Production environment. Your Production environment will continue to generate emails regarding module updates.

Contact supportStill need assistance? Contact Acquia Support