You are here

function recovery_pass_mail in Recovery Password (Email New Password) 8

Same name and namespace in other branches
  1. 7 recovery_pass.module \recovery_pass_mail()

Implements hook_mail().

File

./recovery_pass.module, line 94
Contains module code.

Code

function recovery_pass_mail($key, &$message, $params) {
  switch ($key) {
    case 'recovery_pass':

      // Mail parameters used for recovery mail.
      $message['subject'] = $params['subject'];
      $message['body'][] = $params['body'];
      if (\Drupal::moduleHandler()
        ->moduleExists("htmlmail")) {

        // For html mail.
        $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed';
      }
      break;
  }
}