You are here

function opigno_messaging_mail in Opigno messaging 8

Same name and namespace in other branches
  1. 3.x opigno_messaging.module \opigno_messaging_mail()

Implements hook_mail().

File

./opigno_messaging.module, line 571
Contains opigno_messaging.module.

Code

function opigno_messaging_mail($key, &$message, $params) {
  if ($key == 'message_notification') {
    $message['from'] = \Drupal::config('system.site')
      ->get('name');
    $message['subject'] = $params['subject'];
    $message['body'][] = $params['message'];
  }
}