You are here

function contact_emails_mail in Contact Emails 8

Implements hook_mail().

File

./contact_emails.module, line 138
Contains contact_emails.module..

Code

function contact_emails_mail($key, &$message, $params) {
  switch ($key) {
    case 'contact_emails':
      $message['from'] = \Drupal::config('system.site')
        ->get('mail');
      $message['subject'] = $params['subject'];
      $message['params']['format'] = $params['format'];
      $message['headers']['Content-Type'] = $params['format'];
      $message['body'][] = $params['message'];
      break;
  }
}