You are here

protected function EmailedExport::emailRecipients in Webform Scheduled Tasks 8.2

Email recipients of this task.

Parameters

string $key: The mail key.

array $params: The mail params.

1 call to EmailedExport::emailRecipients()
EmailedExport::executeTask in src/Plugin/WebformScheduledTasks/Task/EmailedExport.php
Execute a task.

File

src/Plugin/WebformScheduledTasks/Task/EmailedExport.php, line 355

Class

EmailedExport
A task which emails an export of a list of webforms.

Namespace

Drupal\webform_scheduled_tasks\Plugin\WebformScheduledTasks\Task

Code

protected function emailRecipients($key, array $params) {
  foreach ($this
    ->getEmailAddresses() as $email_address) {
    $this->mailManager
      ->mail('webform_scheduled_tasks', $key, $email_address, LanguageInterface::LANGCODE_DEFAULT, $params);
  }
}