On 06-Jul-01 Jerry Lake wrote:
> Is it possible the set a script
> to email a file after it becomes so many lines
> long ? I have an email address that accepts
> only catalog requests and I'd like to be able
> to have a complete list mailed to me instead of
> doing it one at a time.

$fdone=$fname .'.tst';
link($fname, $fdone);

$cmd="/usr/bin/wc -l fdone";
$p=popen($cmd, 'r');
if ($p) {
    if ( ($lines +0) > 10) {
        `/usr/bin/mail -s "Catalog Requessts" [EMAIL PROTECTED] < $fdone`;
    } else {
         `/bin/cat $fdone >> $fname`;
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to