You are here

function hook_mail_safety_load in Mail Safety 8

Same name and namespace in other branches
  1. 7.2 mail_safety.api.php \hook_mail_safety_load()
  2. 7 mail_safety.api.php \hook_mail_safety_load()

Respond to a mail being loaded.

Parameters

array $message: The message array.

Return value

array Return the message array after any changes.

1 invocation of hook_mail_safety_load()
MailSafetyController::load in src/Controller/MailSafetyController.php
Load one or more mails.

File

./mail_safety.api.php, line 40
Hooks provided by the Mail Safety module.

Code

function hook_mail_safety_load(array $message) {
  if (!empty($message['attachments'])) {
    $message['has_attachments'] = TRUE;
  }
  return $message;
}