You are here

function notify_mail in Notify 6

Same name and namespace in other branches
  1. 8 notify.module \notify_mail()
  2. 7 notify.module \notify_mail()
  3. 2.0.x notify.module \notify_mail()
  4. 1.0.x notify.module \notify_mail()

File

./notify.module, line 613
Notify module sends email digests of new content and comments.

Code

function notify_mail($key, &$message, $params) {
  global $user;
  $message['subject'] = t('!sitename new content notification for !username', array(
    '!username' => $user->name,
    '!sitename' => variable_get('site_name', 'Drupal'),
  ));
  $message['body'] = t('Greetings !user,', array(
    '!user' => $user->name,
  )) . "\n\n";
  $message['body'] .= $params['content'];
  $message['body'] .= "-- \n" . t('This is an automatic e-mail from !sitename.', array(
    '!sitename' => variable_get('site_name', 'Drupal'),
  )) . "\n" . t('To stop receiving these e-mails, change your notification preferences at !notify-url', array(
    '!notify-url' => url("user/{$user->uid}/notify", array(
      'absolute' => TRUE,
    )),
  )) . "\n";
}