1.7.1 mail for approval "reject" or "more info" not sent to area admin
Brought to you by:
jberanek
Hi
MRBS version: 1.7.1
I have enabled the approval process of bookings for one of our rooms.
The following is set in the config.inc.php
$mail_settings['booker'] = TRUE;
$mail_settings['book_admin_on_approval'] = TRUE;
$mail_settings['on_new'] = TRUE;
$mail_settings['on_change'] = TRUE;
$mail_settings['on_delete'] = TRUE;
An email is sent out to the booker as well as to the area admin on a new booking which is fine.
However, the area administrator gets no email when he either "rejects" a requests or sends out "more info".
What do i have to do to make this work? :)
Best,
Thomas
I upgraded to 1.9.2 and the issue is still the same.
In 1.9.2 try changing lines 801-803 of functions_mail.inc from
to
I changed it but it doesn't work for "reject" or "more info"
// if we're requiring bookings to be approved and this user needs approval
// for this room, then get the email addresses of the approvers
//if (!in_array($action, array("delete", "reject")) &&
// $approval_enabled &&
// !auth_book_admin($user, $data['room_id']))
// 01.03.2021 TS: https://sourceforge.net/p/mrbs/support-requests/2312/
if ($approval_enabled)
{
$to[] = get_approvers_email($data['room_id']);
}
($mail_settings['admin_on_bookings']) ? $to[] = $mail_settings['recipients'] : '';
if ($mail_settings['area_admin_on_bookings'])
{
// Look for list of area admins email addresses
if (empty($data['area_admin_email']))
{
$email = get_area_admin_email($data['id'], ($data['rep_type'] != REP_NONE));
if (!empty($email))
{
$to[] = $email;
}
}
else
{
$to[] = $data['area_admin_email'];
}
}
...