You are here

function email_confirm_mail in Email Change Confirmation 7

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

Implements hook_mail().

File

./email_confirm.module, line 322
The Email Change Confirmation module.

Code

function email_confirm_mail($key, &$message, $params) {
  $language = $message['language'];
  $account = $params['account'];
  $context = $params['context'];
  $email_confirm = new stdClass();
  $email_confirm->url = $context['url'];
  $variables = array(
    'email_confirm' => $email_confirm,
    'user' => $account,
  );
  $message['subject'] = email_confirm_mail_text('confirmation_email_subject', $language, $variables);
  $message['body'][] = email_confirm_mail_text($key . '_body', $language, $variables);
  if (isset($params['headers']['Bcc'])) {
    $message['headers']['Bcc'] = $params['headers']['Bcc'];
  }
}