add emails types to hook

This commit is contained in:
2017-06-27 22:06:19 +10:00
parent c2f8d71664
commit 83d3b57d1d
2 changed files with 6 additions and 3 deletions

View File

@@ -210,7 +210,7 @@ function _booking_balance_payment_email($nid) {
$html_body = theme('booking_htmlmail_registration_mail',
array(
'module' => 'booking',
'key' => 'registration_mail',
'key' => 'registration_mail_bal_outstanding',
'body' => $message_body,
'subject' => $subject,
));
@@ -325,7 +325,7 @@ function _booking_custom_email($nid, $email_type, $sender = 'contact') {
$html_body = theme('booking_htmlmail_registration_mail',
array(
'module' => 'booking',
'key' => 'registration_mail',
'key' => 'booking_email_custom',
'body' => $message_body,
'subject' => $subject,
));

View File

@@ -877,7 +877,10 @@ function booking_mail($key, &$message, $params) {
*/
function booking_mail_alter(&$message) {
// $message['id'] comes from {module_name}_{email_key}
if($message['id'] == 'booking_registration_mail') {
$implemented_message_ids = array('booking_registration_mail', 'booking_email_custom', 'registration_mail_bal_outstanding');
if (in_array($message['id'], $implemented_message_ids)) {
//if($message['id'] == 'booking_registration_mail') {
watchdog('booking_debug', "Message key matched in booking_mail_alter, setting to html email.");
$headers = array(
'MIME-Version' => '1.0',