You are here

public function MailSafetyController::view in Mail Safety 8

Let's the user view the e-mail caught by Mail Safety.

Return value

array A render array of the e-mail content.

1 string reference to 'MailSafetyController::view'
mail_safety.routing.yml in ./mail_safety.routing.yml
mail_safety.routing.yml

File

src/Controller/MailSafetyController.php, line 18

Class

MailSafetyController
Class MailSafetyController.

Namespace

Drupal\mail_safety\Controller

Code

public function view($mail_safety) {
  $system = $this
    ->getMailSystem($mail_safety['mail']);
  $mail_safety['mail'] = $system
    ->format($mail_safety['mail']);
  return [
    '#theme' => 'mail_safety_mail',
    '#mail' => $mail_safety['mail'],
  ];
}