Hi list,

I'm playing around Net::POP3.
I wanna make a script that is able to check for pop3 mail and then save them
in a MySQL database (not implemented yet, usefull for mailing archiving)
I'm at the start of the script but i have a problem.

First i check for new mail : OK
Then i get  mail : OK
Then i get print mail : OK
Then i delete the mails : PROBLEM.

I can't delete them. Why ? an idea ?


Here is the code :

------<cut>-----
#!/usr/bin/perl

use Net::POP3;

# Variables
$hostname="www.isecurelabs.com";
$account="securiteam\@isecurelabs.com";
$password="eniac";
$timeout ="3600";

# pop3 connection
$handle = Net::POP3->new($hostname,Timeout => $timeout) or die "Connection
au serveur POP3 $hostname impossible.\n";

# Authentification
defined($handle->login($account, $password)) or die "Probléme
authentification ($account, $password) sur $hostname.\n";

# command list
$list=$handle->list();

#############work with each mail##############

foreach $item (keys %$list) {

# get mail
$message = $handle->get($item);

# print mail (waiting for coding database support)
@message = @$message;
print "\n@message\n";

# del mail
$handle->delete($item);
print "\nMail $item efface\n";

};

------<cut>-----



Thanks very much,
regards,

---
Cabezon Aurélien | [EMAIL PROTECTED]
http://www.iSecureLabs.com | French Security Portal

____________________________________________
" Sachez qu'aujourd'hui est le plus beau jour de votre vie,
car c'est le premier de ceux qu'il vous reste ŕ vivre "


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to