你的分享就是我们的动力 ---﹥

Perl 使用 Mail::POP3Client 发送邮件

时间:2013-05-30 00:09来源:www.chengxuyuans.com 点击:

代码简介

暂无

Perl代码片段

use Mail::POP3Client;

$mail = new Mail::POP3Client("username", "password", "pop3.yourserver.com");

if ($mail->Count) {

    print "You have ", $mail->Count, " new message(s).\n";

    print "Storing message(s) to disk.\n";

    open FILEHANDLE, ">file.txt";

    for($loop_index = 1; $loop_index <= $mail->Count; $loop_index++) {

        print FILEHANDLE $mail->HeadAndBody(1);

    }

    close FILEHANDLE;
}

转载注明地址:http://www.chengxuyuans.com/Perl/63109.html