Forum Moderators: bakedjake
I have a php website on a Linux server and I'd like to send emails to a list of email addresses taken from a mysql database at a fixed hour, on a daily or user-customized basis.
Since you have PHP already installed, and a linux server, that's pretty straight-forward to do (famous last words).
From the PHP perspective, if you don't already have the queries set up to yank all the emails out of MySQL, check out [webmasterworld.com ]. A nice tutorial by Jatar_k, describing basic mysql extraction functions.
Once that's working, you can plug in the emails into the php mail() functions: [ca3.php.net ].
Once *that's* done, you can cron it... the basic syntax is like this:
(this example says do the job at 8 am every day)
#minute hour day of month month of year day of week (0-6; the 0 refers to Sunday) command
0 8 * * * /usr/local/bin/php /path/to/your/script.php&
15 8 1 1 * usr/local/bin/php /path/to/happynewyear.php&
Currently php doesn't support modifying crons (AFAIK)
HTH,
-MM