You are here

function email_tfa_mail in Two-factor Authentication (TFA) 7

Implements hook_mail().

File

./tfa.api.php, line 86
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function email_tfa_mail($key, &$message, $params) {
  if ($key == 'tfa_send') {
    $message['subject'] = t('Login code from @site-name', array(
      '@site-name' => variable_get('site_name', 'Drupal'),
    ));
    $message['body'][] = t('@message', array(
      '@message' => $params['message'],
    ));
    $message['body'][] = t('@code', array(
      '@code' => $params['code'],
    ));
  }
}