You are here

function opigno_ilt_mail in Opigno Instructor-led Trainings 8

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

Implements hook_mail().

File

./opigno_ilt.module, line 232
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'];
}