[plug] tail -f
William Kenworthy
billk at iinet.net.au
Sun Aug 14 15:15:11 WST 2005
You can telnet directly to a pop3 or imap port and get a list of emails
waiting for download using simple ascii text commands.
or
using perl and the Mail::POP3Client or the similar imap modules and you
can do something like:
(cut from
"http://search.cpan.org/~sdowd/Mail-POP3Client-2.16/POP3Client.pm"
_____
use Mail::POP3Client;
$pop = new Mail::POP3Client( USER => "me",
PASSWORD => "mypassword",
HOST => "pop3.do.main" );
for( $i = 1; $i <= $pop->Count(); $i++ ) {
foreach( $pop->Head( $i ) ) {
/^(From|Subject):\s+/i && print $_, "\n";
}
}
$pop->Close();
____
A bit of inventive scripting and you can have it check every 10 minutes
(downloading new headers only), and haveit pop up a list if any showup.
Possibilities are endless...
There comes a time when the simple approach like yours proves just too
much work.
BillK
On Sun, 2005-08-14 at 12:23 +0930, Onno Benschop wrote:
> William Kenworthy wrote:
>
...
> I might add that while my PHP script stops when the stop word comes
> past, the process doesn't actually terminate because tail is still
> running. I haven't figured out a better way yet.
>
>
> So if you have any ideas, I'm all ears.
>
> Cheers,
>
--
William Kenworthy <billk at iinet.net.au>
Home!
More information about the plug
mailing list