Reading pop3 accounts
Stuart Thorn (thorn@spinnaker.fr)
Mon, 26 Jan 1998 14:55:20 +0100
I want to write a function that will do something like (but hopefully more
efficiently):
sub readmail {
my( $account, $login, $pass ) = @_;
my $leavemailonserver = 1; # IMPORTANT: just want to read mail, + not take
it off
my ( @mails );
my $mailobject = new MailObject( $account, $login, $pass,
$leavemailonserver );
while( $mailobject->hasUnreadMail() ) {
my( $messages, $sender, $date, $subject ) = $mailobject->nextmessage();
push( @mails, [( $messages, $sender, $date, $subject )] );
}
@mails;
}
Does the libwww package have a viable solution for this, or are there other
more suitable packages. Could someone maybe point me to some ready-rolled
code?
Thanks for your help.
Stuart Thorn,
Spinnaker Internet Services, Paris, France.
thorn@spinnaker.fr http://www.spinnaker.fr