You are here

function social_media_mail in Social media share 8

Implements hook_mail().

File

./social_media.module, line 27
Contains social_media.module..

Code

function social_media_mail($key, &$message, $params) {
  switch ($key) {
    case 'forward_email':
      $message['from'] = \Drupal::config('system.site')
        ->get('mail');
      $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed; delsp=yes';
      $message['subject'] = $params['subject'];
      $message['body'][] = $params['message'];
      break;
  }
}