Skip to content

Email notifications

MRBS can notify administrators, room contacts, booking creators, and other recipients when bookings change.

Choose a backend

MRBS 1.12.2 supports PHP mail, Sendmail, qmail, and SMTP backends. SMTP is usually the easiest option to diagnose and secure.

$mail_settings['admin_backend'] = 'smtp';

$smtp_settings['host'] = 'mail.example.org';
$smtp_settings['port'] = 587;
$smtp_settings['auth'] = true;
$smtp_settings['secure'] = 'tls';
$smtp_settings['username'] = 'mrbs@example.org';
$smtp_settings['password'] = 'replace-this-password';

Do not publish mail credentials.

Configure sender and recipients

Set a valid sender address and decide which roles receive messages:

$mail_settings['from'] = 'mrbs@example.org';
$mail_settings['recipients'] = 'facilities@example.org';

$mail_settings['admin_on_bookings'] = true;
$mail_settings['area_admin_on_bookings'] = true;
$mail_settings['room_admin_on_bookings'] = true;
$mail_settings['booker'] = true;

You can independently enable messages for new, changed, and deleted bookings.

Message content

Messages can include:

  • booking details;
  • HTML formatting; and
  • an iCalendar attachment.

Consider privacy before including full details. Email leaves the access-control boundary of the application.

Transport security

Keep peer and hostname verification enabled for SMTP TLS:

$smtp_settings['ssl_verify_peer'] = true;
$smtp_settings['ssl_verify_peer_name'] = true;
$smtp_settings['ssl_allow_self_signed'] = false;

Install the correct certificate authority instead of disabling verification.

Test notifications

Create, change, and delete a test booking. Check:

  • sender and reply-to addresses;
  • intended To and Cc recipients;
  • area and room administrator delivery;
  • HTML and plain-text rendering;
  • iCalendar attachment behavior; and
  • mail-server logs when a message does not arrive.

Enable $mail_settings['debug'] only temporarily and ensure debug output cannot expose credentials to users.