You are here

public static function MailSafetyController::getMailSystem in Mail Safety 8

Get the mail system of the given mail.

Parameters

array $mail: The mail array.

Return value

object The mail system object.

3 calls to MailSafetyController::getMailSystem()
MailSafetyController::view in src/Controller/MailSafetyController.php
Let's the user view the e-mail caught by Mail Safety.
SendDefaultForm::submitForm in src/Form/SendDefaultForm.php
Form submission handler.
SendOriginalForm::submitForm in src/Form/SendOriginalForm.php
Form submission handler.

File

src/Controller/MailSafetyController.php, line 141

Class

MailSafetyController
Class MailSafetyController.

Namespace

Drupal\mail_safety\Controller

Code

public static function getMailSystem(array $mail) {
  $mail_manager = \Drupal::service('plugin.manager.mail');
  return $mail_manager
    ->getInstance([
    'module' => $mail['module'],
    'key' => $mail['key'],
  ]);
}