Gordonisnz has asked for the wisdom of the Perl Monks concerning the following question:
------------- END QUOTE MY WORDS :- ok, Printlist does the main processing of the message - & it works.. & ive verified that $msg_id is still correct - But it wont delete...use Net::POP3; # This debug flag will print debugging code to your browser, depending + on its value # Set this to 1 to send debug code to your browser. Set it to 0 to tu +rn it off. my $DEBUG = 1; if($DEBUG) { $| = 1; open(STDERR, ">&STDOUT"); } # Set this variable to your POP3 server name my $ServerName = "my.server.com"; # Create a new POP3 object my $pop3 = Net::POP3->new($ServerName, Debug => 0) or die "Couldn't lo +g on to server"; # Initiate the mail transaction my $UserName = "username"; my $Password = "password"; my $Num_Messages = $pop3->login($UserName, $Password); # Get the list of messages my $Messages; my $msg_id; $Messages = $pop3->list(); # Parse each message header for "From" and "Subject" fields foreach $msg_id (keys(%$Messages)) { if ($msg_id <$end){ next; } my $MsgContent = $pop3->top($msg_id, 50); PrintList($msg_id,@$MsgContent); my $delete = $pop3->delete($msg_id);
Even if I delete before it gets processed - It still processes the message, However it doesnt delete.my $MsgContent = $pop3->top($msg_id, 50); my $delete = $pop3->delete($msg_id); PrintList($msg_id,@$MsgContent);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: POP3 Delete ?
by virtualsue (Vicar) on Mar 25, 2003 at 13:54 UTC | |
|
Re: POP3 Delete ?
by Mr. Muskrat (Canon) on Mar 25, 2003 at 14:19 UTC | |
|
Re: POP3 Delete ?
by shotgunefx (Parson) on Mar 25, 2003 at 13:33 UTC | |
|
FIXED: Re: POP3 Delete ?
by Gordonisnz (Initiate) on Mar 25, 2003 at 14:12 UTC | |
by shotgunefx (Parson) on Mar 25, 2003 at 14:20 UTC | |
|
Re: POP3 Delete ?
by dbush (Deacon) on Mar 25, 2003 at 13:57 UTC | |
|
Re: POP3 Delete ?
by tachyon (Chancellor) on Mar 25, 2003 at 23:14 UTC |