Mail::POP3Client模块
时间:2006-04-29 来源:coldrainsunc
#!/usr/bin/perl -w
#name:getmail.pl
use strict;
use Mail::POP3Client;
my $user="user";
my $passwd="password";
my $host="pop.163.com";
my $pop=new Mail::POP3Client(USER=>$user,PASSWORD=>$passwd,HOST=>$host);
for( my $i = 1; $i <= $pop->Count(); $i++ ) {
foreach( $pop->Head( $i ) ) {
print $_, "\n";
}
}
$pop->Close();
print "--------------------------------\n";
print " Over\n"
print "--------------------------------\n";
运行此脚本,就可以得到信件头部信息了,如果要运用该模块的其他功能,可以用
perldoc Mail::POP3Client
查阅。当然我们还可以写脚本进行过滤。
#name:getmail.pl
use strict;
use Mail::POP3Client;
my $user="user";
my $passwd="password";
my $host="pop.163.com";
my $pop=new Mail::POP3Client(USER=>$user,PASSWORD=>$passwd,HOST=>$host);
for( my $i = 1; $i <= $pop->Count(); $i++ ) {
foreach( $pop->Head( $i ) ) {
print $_, "\n";
}
}
$pop->Close();
print "--------------------------------\n";
print " Over\n"
print "--------------------------------\n";
运行此脚本,就可以得到信件头部信息了,如果要运用该模块的其他功能,可以用
perldoc Mail::POP3Client
查阅。当然我们还可以写脚本进行过滤。
相关阅读 更多 +
排行榜 更多 +