/** * {@inheritdoc} */ public function mail($module, $key, $to, $langcode, $params = array(), $reply = NULL, $send = TRUE) { $message = $this->mailManager->mail($module, $key, $to, $langcode, $params, $reply, $send); $instance = $this->mailManager->getInstance(['module' => $module, 'key' => $key]); $this->dataCollector->addMessage($message, $instance); return $message; }
/** * {@inheritdoc} */ public function mail(array $message) { $this->dataCollector->addMessage($message, $this->plugin_id, $this->configuration, $this->mail); return $this->mail->mail($message); }