-
Notifications
You must be signed in to change notification settings - Fork 1
ReservationReminders
If you choose to enable reservation reminders in config.php, read the following carefully to make it work.
Reservation reminders will be sent by email to those who have reservations the current day and have enabled reservation reminders in the control panel. The script that sends out reservation reminders is reminders.php, and the idea is to run the script daily, early in the morning.
There are different ways to to this, depending on the operating system etc.
If you have access to the command line on the web server and the web server is running Linux, which it most likely does, you can do this:
- Log in to the command line on the web server
- Run these commands
export EDITOR=nano
crontab -e
0 6 * * * php /full/path/to/phpmyreservation/reminders.php
- Save with
Ctrl + o
, pressreturn
and exit withCtrl + x
This will run the script daily, at 06:00. Make sure that you use the correct path.
If you don't have access to the command line, your web host provider may have a control panel or similar where you can add scheduled events.
If you have another computer/server that is running 24/7, you can set it up to run the reminders.php script daily over HTTP, for example using cron and cURL.
To run the script over HTTP you must supply the code that you set in config.php, to avoid that everyone is able to run the script. You must run it like this:
http://your.server/phpmyreservation/reminders.php?code=CODE
There are several reasons why this may not work. Your web server may be unable to send emails, depending on your web host provider. If you are running phpMyReservation on domain.com, you should edit config.php to use [email protected], an email address that you own, as sender for reservation reminders, or else it may not work because they will be rejected or marked as spam.