diff --git a/booking.emails.inc b/booking.emails.inc index 50c4169..7aef23a 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -246,19 +246,17 @@ function _booking_custom_email($nid, $email_type, $sender = 'contact') global $user; $language = user_preferred_language($user); + //calculate the drupal variables to use + $email_subject_variable = 'booking_email_subject_' . $email_type; + $email_body_variable = 'booking_email_' . $email_type; + if ($sender == 'contact') { watchdog('booking', 'Sending a custom email from the contact email address.'); - //calculate the drupal variables to use - $email_subject_variable = 'booking_email_subject_' . $email_type; - $email_body_variable = 'booking_email_' . $email_type; //calculate the from email address for a contact email $from = t('!event Registrations ', array('!event' => $event->booking_eventname, '!email' => variable_get('booking_contact_email', variable_get('site_mail', ini_get('sendmail_from'))) )); } elseif ($sender == 'logistics') { - //calculate the drupal variables to use - $email_subject_variable = 'booking_email_logistics_subject_' . $email_type; - $email_body_variable = 'booking_email_logistics_' . $email_type; //watchdog('booking_debug', "
Custom logistics email\n@subject\n@body", // array('@subject' => $email_subject_variable, '@body' => $email_body_variable)); //calculate the from email address for a logistics email