You are here

function opigno_ilt_mail in Opigno Instructor-led Trainings 3.x

Same name and namespace in other branches
  1. 8 opigno_ilt.module \opigno_ilt_mail()

Implements hook_mail().

File

./opigno_ilt.module, line 234
Contains opigno_ilt.module.

Code

function opigno_ilt_mail($key, &$message, $params) {
  if ($key !== 'upcoming_ilt_notify') {
    return;
  }
  $message['from'] = \Drupal::config('system.site')
    ->get('mail');
  $message['subject'] = $params['subject'];
  $message['body'][] = $params['message'];
  $message['params']['attachments'][] = $params['attachments'];
}