Re: Re: Delayed mail()... ?
| From: | Seba | Date: | Fri, 20 Feb 2004 14:04:32 +0000 |
| Subject: | Re: Re: Delayed mail()... ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178353@lists.php.net to get a copy of this message | ||
The solution to use cron is good, in this way you can run the script
manually to if you want, you have to:
1)Insert data into a databse or a text file, create a php page with the
comparison of the dates (from the databe or the txt file) and the mail()
command.
2) create a shell script that does a GET
http://abcabc.com/yourscript.php
3) a cron for the shell script every day.
Seba
Il ven, 2004-02-20 alle 14:36, Ben Ramsey ha scritto:
> Probably the best way to do this is the use cron to schedule a script to
> run at a specified time.
>
> The way I'd do it is to create a PHP script that compares the current
> date with the date they registered (you'd save that date to the
> database, of course). If the current date is greater than 3 days and
> less than 4 days older than the date they registered, then you'd use
> mail() to send them another message.
>
> Use cron to schedule the script to run the script once every day.
>
> For the PHP script that cron will be running, you'll need to put this
> line in above the first <?php tag:
>
> #!/usr/bin/php -q
>
> That way, it'll execute on the system. And you may have the chmod the
> file 755, though I can't remember if that's necessary.
>
> Finally, your system must be Linux (or other unix-type system) for this
> to work correctly. If it's Windows, you can use the task scheduler, but
> I don't think it'll execute the PHP script.
>
>
>
> Tristan Pretty wrote:
> > I've been asked to add a small amount of functionality to a site I've
> > built....
> > (It's a techer at home web site)
> >
> > Basically, prospective teachers/students, can sign up for more info etc.
> > Currently, that info is captured, and the site admin people are
> > E-mailed...
> > all good so far..
> >
> > What they've asked for, is that when they reply to the enquiry, they are
> > reminded to chase up the enqiry a few days later...
> > Now I could give them a message on screen, if they happen to be in the
> > admin area, but what i'd like to do , is simply mail the admin users,
> > after say, 3 days.
> > regardless if they even visit the admin area at all...
> >
> > is this possible at all?
> >
> > I use 12All E-mail software at work, and that has a delayed sending
> > option, but I@ve NO idea how it works...
> >
> > Any suggetions?
> >
> >
> >
> > *********************************************************************
> > The information contained in this e-mail message is intended only for
> > the personal and confidential use of the recipient(s) named above.
> > If the reader of this message is not the intended recipient or an agent
> > responsible for delivering it to the intended recipient, you are hereby
> > notified that you have received this document in error and that any
> > review, dissemination, distribution, or copying of this message is
> > strictly prohibited. If you have received this communication in error,
> > please notify us immediately by e-mail, and delete the original message.
> > ***********************************************************************