You are here

public function MigrationBase::disableMailSystem in Migrate 7.2

Disables mail system to prevent emails from being sent during migrations.

1 call to MigrationBase::disableMailSystem()
MigrationBase::beginProcess in includes/base.inc
Begin a process, ensuring only one process can be active at once on a given migration.

File

includes/base.inc, line 1432
Defines the base class for migration processes.

Class

MigrationBase
The base class for all objects representing distinct steps in a migration process. Most commonly these will be Migration objects which actually import data from a source into a Drupal destination, but by deriving classes directly from MigrationBase…

Code

public function disableMailSystem() {
  global $conf;
  if (!empty($conf['mail_system'])) {
    foreach ($conf['mail_system'] as $system => $class) {
      $conf['mail_system'][$system] = 'MigrateMailIgnore';
    }
  }
  else {
    $conf['mail_system'] = array(
      'default-system' => 'MigrateMailIgnore',
    );
  }
}