Reputation: 16194
I Have a system which is managing the document authorization on different hierarchy level, In this i need the system to automatically mail to the user for some reminder/notification before 3 days of expiry, I am using PHP MYSQL APACHE
How can I Achieve this?
Upvotes: 0
Views: 1107
Reputation: 3021
You can really only do this with Cron. If your server is a Linux host, you can schedule a PHP script (which you'll need to write) to run at a set time, e.g. every minute. Your script will check against the users database, select any users that are 3 days from expiry and mail them. Setting up cron is host-specific and your hosting provider might not even let you do it. Usually you'll have some server administration software (e.g. cPanel) that will let you schedule a cron job and specify which script to run. If you have SSH access, even easier - you can just SSH in and run crontab -e
to set up a cron schedule yourself. There are plenty of cron tutorials on Google.
Check with your hosting provider if they allow scheduled activities.
Upvotes: 1
Reputation: 1010
make a script, and let cron job do the automatic email sending for you
Or you can use Swiftmailer
Upvotes: 1