theming of email body
This commit is contained in:
@@ -869,6 +869,32 @@ function booking_mail($key, &$message, $params) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_mail_alter()
|
||||
*/
|
||||
function booking_mail_alter(&$message) {
|
||||
// $message['id'] comes from {module_name}_{email_key}
|
||||
if($message['id'] == 'booking_registration_mail') {
|
||||
$headers = array(
|
||||
'MIME-Version' => '1.0',
|
||||
'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
|
||||
'Content-Transfer-Encoding' => '8bit',
|
||||
'X-Mailer' => 'Drupal',
|
||||
);
|
||||
}else{
|
||||
$headers = array(
|
||||
'MIME-Version' => '1.0',
|
||||
'Content-Type' => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
|
||||
'Content-Transfer-Encoding' => '8bit',
|
||||
'X-Mailer' => 'Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
//Overwrite header message header with Content-Type accommodating for html format
|
||||
foreach($headers as $key => $value) {
|
||||
$message['headers'][$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_library().
|
||||
|
Reference in New Issue
Block a user