function pet_mail in Previewable email templates 8
Same name and namespace in other branches
- 8.4 pet.module \pet_mail()
- 8.3 pet.module \pet_mail()
- 6 pet.module \pet_mail()
- 7 pet.module \pet_mail()
Implements 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 292 - 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']);
}
}