mirror of https://github.com/BOINC/boinc.git
Drupal: Add boinccore_mail_alter to change encoding.
Changes header and body encoding to use 'quoted-printable'. Part of https://dev.gridrepublic.org/browse/DBOINCP-479
This commit is contained in:
parent
9988110928
commit
3724a0f9f2
|
@ -787,6 +787,21 @@ function boinccore_link($type, $object, $teaser = FALSE) {
|
|||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_mail_alter()
|
||||
*/
|
||||
function boinccore_mail_alter(&$message) {
|
||||
/* This code alters the headers for all emails sent by the Drupal Web site to use
|
||||
'Quote-Printable' as the encoding, both altering the header and modifies the body to the
|
||||
new encoding.
|
||||
*/
|
||||
$message['headers']['Content-Transfer-Encoding'] = 'Quoted-Printable';
|
||||
if (is_array($message['body'])) {
|
||||
$message['body'] = array_map( "quoted_printable_encode", $message['body'] );
|
||||
} else {
|
||||
$message['body'] = quoted_printable_encode($message['body']);
|
||||
}
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Page callbacks from hook_menu()
|
||||
|
|
Loading…
Reference in New Issue