You are here

function pet_mail in Previewable email templates 6

Same name and namespace in other branches
  1. 8.4 pet.module \pet_mail()
  2. 8 pet.module \pet_mail()
  3. 8.3 pet.module \pet_mail()
  4. 7 pet.module \pet_mail()

Implementation of hook_mail()

To customize, e.g. to change the content type to text/html etc, you can use hook_mail_alter() in one of your modules.

File

./pet.module, line 296
Previewable E-mail Template module.

Code

function pet_mail($key, &$message, $params) {
  $message['subject'] = $params['subject'];
  $message['body'][] = $params['body'];
  if (is_array($params['pet_cc']) && count($params['pet_cc']) > 0) {
    $message['headers']['Cc'] = implode(',', $params['pet_cc']);
  }
  if (is_array($params['pet_bcc']) && count($params['pet_bcc']) > 0) {
    $message['headers']['Bcc'] = implode(',', $params['pet_bcc']);
  }
}