I just ran a migration to import 3000 users.

My field mappings look like
$this->addFieldMapping('mail','mail');
$this->addFieldMapping('name', 'name')->dedupe('users', 'name');
$this->addFieldMapping('roles','role');
$this->addFieldMapping('status')->defaultValue(1);

This triggered Drupal to send welcome emails to all the users. How do I prevent the migrate module from sending emails.

Comments

mikeryan’s picture

Status: Active » Closed (duplicate)

Migrate is supposed to automatically disable email while running, but there is a bug in the current dev, which is fixed in the wizard_api branch (to be merged back to 7.x-2.x-dev before too long, I hope): #1900914: MigrateMailIgnore is only used when there are custom mail systems present.

giorgio79’s picture

You can also turn off user mail on reg in account settings.