You are here

function commentaccess_mail in Comment Access 7

Implementation of hook_mail()

Parameters

string $key:

array $message:

array $params:

File

./commentaccess.module, line 544
Provides users with permissions for comments on nodes they own.

Code

function commentaccess_mail($key, &$message, $params) {
  if ($key == 'commentaccess_email') {
    $subject = variable_get('commentaccess_mail_subject', '@commenter posted a new comment!');
    $body = variable_get('commentaccess_mail_message', commentaccess_mail_message_default());
    $langcode = isset($message['language']->language) ? $message['language']->language : NULL;
    $message['subject'] = t($subject, $params['replacements'], array(
      'langcode' => $langcode,
    ));
    $message['body'][] = t($body, $params['replacements'], array(
      'langcode' => $langcode,
    ));
  }
}