function forward_mail_alter in Forward 4.0.x
Same name and namespace in other branches
- 8.3 forward.module \forward_mail_alter()
- 8 forward.module \forward_mail_alter()
- 8.2 forward.module \forward_mail_alter()
- 4.x forward.module \forward_mail_alter()
Implements hook_mail_alter().
File
- ./
forward.module, line 131 - Allows forwarding of entities by email.
Code
function forward_mail_alter(&$message) {
if ($message['module'] == 'forward') {
if ($message['key'] == 'mail_entity' || $message['key'] == 'send_entity') {
if (!empty($message['params']['plain_text'])) {
$message['headers']['Content-Type'] = 'text/plain; charset=utf-8';
}
else {
$message['headers']['Content-Type'] = 'text/html; charset=utf-8';
}
$message['headers']['MIME-Version'] = '1.0';
$message['headers']['Reply-to'] = $message['params']['headers']['Reply-To'];
$message['headers']['Sender'] = $message['headers']['From'];
}
}
}