function tripal_pub_mail

2.x tripal_pub.module tripal_pub_mail($key, &$message, $params)
3.x tripal_pub.module tripal_pub_mail($key, &$message, $params)
1.x tripal_pub.module tripal_pub_mail($key, &$message, $params)

File

tripal_pub/tripal_pub.module, line 884
The Tripal Publication module allows you to search the PubMed databse for academic articles, that relate to user specified tpoic\s. As well, it allows management of publications so that a user can enter specified details regarding a desired…

Code

function tripal_pub_mail($key, &$message, $params) {
  $language = $message['language'];
  $variables = user_mail_tokens($params['account'], $language);
  switch ($key) {
    case 'import_report':
      $headers = array(
        'MIME-Version' => '1.0',
        'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
        'Content-Transfer-Encoding' => '8Bit',
        'X-Mailer' => 'Drupal'
      );
      foreach ($headers as $key => $value) {
        $message['headers'][$key] = $value;
      }
      $message['subject'] = t('Publication import from !site', $variables, $language->language);
      $message['body'][] = $params['message'];
      break;
  }
}