You are here

function message_digest_mail in Message Digest 7

Same name and namespace in other branches
  1. 8 message_digest.module \message_digest_mail()

Implements hook_mail()

File

./message_digest.module, line 52

Code

function message_digest_mail($key, &$message, $params) {
  if ($key == 'digest') {
    $title = variable_get('site_name', 'Open Atrium');

    // @TODO: USE THE NAME OF THE GROUP/SPACE HERE IF IT EXISTS.
    if (!empty($params['gid'])) {
      $group = node_load($params['gid']);
      $title = $group->title;
    }
    $message['subject'] = $title . t(' Message Digest');
    $message['body'][] = $params['body'];
  }
}