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