You are here

function email_confirm_mail in Email Change Confirmation 6

Same name and namespace in other branches
  1. 5 email_confirm.module \email_confirm_mail()
  2. 7 email_confirm.module \email_confirm_mail()

Implementation of hook_mail().

File

./email_confirm.module, line 207

Code

function email_confirm_mail($key, &$message, $params) {
  $language = $message['language'];
  $account = $params['account'];
  $context = $params['context'];
  $variables = user_mail_tokens($account, $language);
  $variables += array(
    '!email_url' => $context['url'],
  );
  $message['subject'] = strtr($context['subject'], $variables);
  $message['body'][] = strtr($context['body'], $variables);
  if ($params['headers']['bcc']) {
    $message['headers']['bcc'] = $params['headers']['bcc'];
  }
}