You are here

function guestbook_mail in Guestbook 7.2

Same name and namespace in other branches
  1. 6.2 guestbook.module \guestbook_mail()
  2. 6 guestbook.module \guestbook_mail()

Implementation of hook_mail().

File

./guestbook.module, line 737

Code

function guestbook_mail($key, &$message, $params) {
  $language = $message['language'];
  switch ($key) {
    case 'notification':
      $message['subject'] = t('New guestbook entry at [site:name]', array(), array(
        'langcode' => $language->language,
      ));

      // We do not sanitize the token replacement, since the output of this
      // replacement is intended for an e-mail message, not a web browser.
      $message['subject'] = token_replace($message['subject'], array(), array(
        'language' => $language,
        'sanitize' => FALSE,
      ));
      $message['body'][] = $params['body'];
      break;
  }
}