meeting-room-booking-system / mrbs-code

MRBS application code
Other
127 stars 62 forks source link

Send email to the respective logged in user #2221

Open jberanek opened 6 years ago

jberanek commented 6 years ago

Hello! Currently sending the email for each new reservation, change, deletion and approval, but sending only to an administrator email. I need to send a return email for each reservation made to the respective user. The user authentication mode is "Config". In the file "config.inc.php" I can not make an algorithm with the "switch" to send an email to the logged in user confirming the reservation. I think the biggest difficulty is finding the user logged in to the file. Would you help me?

Reported by: *anonymous

Original Ticket: mrbs/support-requests/1512

jberanek commented 6 years ago

I thought it might be this way...

-> config.inc.php

switch (?????) { // user = 'x' case 'x': $mail_settings['cc'] = 'x@test.com'; break;
// user = 'y'
case 'y': $mail_settings['cc'] = 'y@test.com'; break; default: $mail_settings['cc'] = 'z@test.com'; break;
} // switch (???)

Original comment by: *anonymous

jberanek commented 6 years ago

The switch won't work. All you need to do is set in your config file

$mail_settings['booker'] = true;

This will only work with 'config' authentication if all your users have an email address of the form username@domain.com where domain.com is set in $mail_settings['domain']. If that's not the case then you'll need to switch to using the 'db' authentication scheme (which would probably be a good idea anyway as it's much easier to manage users).

Original comment by: campbell-m

jberanek commented 6 years ago

Thank you very much for the quick and efficient response!

Original comment by: *anonymous

jberanek commented 6 years ago

Hi is it possible to send a meeting request

Original comment by: *anonymous

jberanek commented 6 years ago

If you set

$mail_settings['icalendar'] = true;

MRBS will issue a meeting request.

Original comment by: campbell-m

jberanek commented 6 years ago

i put this under config file

Original comment by: *anonymous

jberanek commented 6 years ago

Yes

Original comment by: campbell-m