------------- 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);
In reply to POP3 Delete ? by Gordonisnz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |