function reroute_email_mail in Reroute Email 8
Same name and namespace in other branches
- 6 reroute_email.module \reroute_email_mail()
- 7 reroute_email.module \reroute_email_mail()
- 2.x reroute_email.module \reroute_email_mail()
Implements hook_mail().
File
- ./
reroute_email.module, line 188 - Intercepts all outgoing emails to be rerouted to a configurable destination.
Code
function reroute_email_mail($key, &$message, $params) {
if ($message['id'] !== 'reroute_email_test_email_form') {
return;
}
$message['headers']['Cc'] = $params['cc'];
$message['headers']['Bcc'] = $params['bcc'];
$message['subject'] = $params['subject'];
$message['body'][] = $params['body'];
}