function simple_mail_mail_alter in Simple Mail 7
Same name and namespace in other branches
- 8 simple_mail.module \simple_mail_mail_alter()
- 2.0.x simple_mail.module \simple_mail_mail_alter()
Implements hook_mail_alter().
Override email 'to' address, if configured.
File
- ./
simple_mail.module, line 52 - Simple Mail module.
Code
function simple_mail_mail_alter(&$message) {
// Re-route emails when override email variable is set.
$override_email = variable_get('simple_mail_override', '');
if (!empty($override_email)) {
$message['to'] = $override_email;
}
}