theming of email body

This commit is contained in:
2017-06-27 12:17:54 +10:00
parent b1b900dfb3
commit 7e99092df7
2 changed files with 37 additions and 4 deletions

View File

@@ -31,17 +31,24 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
//send the registering person an email
$to = $node->booking_email;
$body = _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual);
//$body = _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual);
//$params['body'] = $body;
if ($balance_payment == TRUE) {
$subject = t('!event Payment Complete', array('!event' => $event->booking_eventname));
}
else {
$subject = t('!event Registration', array('!event' => $event->booking_eventname));
}
$params['subject'] = $subject;
$params['body'] = $body;
//apply a theme to the HTML body of the email
$html_body = theme('booking_htmlmail_template',
array('variables' => array(
'body' => _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual),
)
));
$params['body'] = $html_body;
if (variable_get('booking_bcc_notify_email_workflow', 0) == 1) {
$params['headers']['Bcc'] = variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from')));
}