RE: Automating PHP email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/

> -----Original Message-----
> From: clr [mailto:clr@xxxxxxxxxx]
> Sent: Tuesday, December 12, 2006 5:02 PM
> To: php-general@xxxxxxxxxxxxx
> Subject:  Automating PHP email
> 
> I am creating a PHP/mySQL site that enables members to set criteria for
> email notification
> As my site changes and clients criteria are met they need to be
> notified.
> I can generate a list of email address and info quite simply using mySQL
> 
> My question is how to "trigger" or initiate this process as I am a bit
> weary of using cron
> 
> Can anyone suggest how I can automate this using PHP ?
> 
> Many thanks
> 
> Colin

Colin,

First, you need to established when and what triggers this actions.

As for the solution I would usually go through these steps : 

- Create a shell PHP script to execute the emailing routine. Such script would
maintain a log of when it was last executed and some other status info, this can
be through a text file of MySQL database. This script can also be used with cron
if you desire or decide to switched back to a more reliable solution :)
- On another script (one that is always called whena user request a page on your
site i.e. global.php). On this script checks the status of the shell script from
its logs, it will determine if IT'S TIME TO RUN THE SCRIPT AGAIN.

This is my oldschool solution :D . I'd still love to hear other's.

Regards,
Jervin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux