You are here

function pet_mail in Previewable email templates 7

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. 6 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 485
Previewable Email Template module.

Code

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