J
jck11
hi all
I want to get my mail from gmail account.
The code below got it.
But I also want the mail reserve one copy in the mail server.
How can I modify the code to match the function.
Thanks for any information.
use MIME:
arser;
use Mail:
OP3Client;
use IO::Socket::SSL;
my $pop3=Mail:
OP3Client->new(
USER=>'xxxxxxxx',
PASSWORD=>'xxxxxxxx',
HOST=>'pop.gmail.com',
PORT=>'995',
USESSL=>'true',
DEBUG=>0,
)or die "can't connect the server.\n";
if(($pop3->Count()) < 1){
print "No messages...\n";
exit;
}
print $pop3->Count() ." messages found!\n";
for($i=1; $i<=$pop3->Count(); $i++){
print $i, "\n";
my $msg=$pop3->Retrieve($i);
my $parser=new MIME:
arser;
$parser->output_dir('c:\\mail');
my $entity=$parser->parse_data($msg);
}
$pop3->Close();
I want to get my mail from gmail account.
The code below got it.
But I also want the mail reserve one copy in the mail server.
How can I modify the code to match the function.
Thanks for any information.
use MIME:
use Mail:
use IO::Socket::SSL;
my $pop3=Mail:
USER=>'xxxxxxxx',
PASSWORD=>'xxxxxxxx',
HOST=>'pop.gmail.com',
PORT=>'995',
USESSL=>'true',
DEBUG=>0,
)or die "can't connect the server.\n";
if(($pop3->Count()) < 1){
print "No messages...\n";
exit;
}
print $pop3->Count() ." messages found!\n";
for($i=1; $i<=$pop3->Count(); $i++){
print $i, "\n";
my $msg=$pop3->Retrieve($i);
my $parser=new MIME:
$parser->output_dir('c:\\mail');
my $entity=$parser->parse_data($msg);
}
$pop3->Close();