#包含收件人列表及可变信息的文本文件 #格式为:用户名,密码,详细信息 #请把它放在当前目录下,并把它命名为list.txt $f_list='list.txt'; open(FILE,$f_list) || die "Can not open list file\n"; while(){ chomp; ($usr,$passwd,$detail) = split(/,/);
print "I am sending Email No.".($cnt+=1)." to ".$to."......\n"; &gingerMail($smtp_server,$from,$to,$title,$msg); print "Email No.".$cnt." has been sent to: ".$to."\n"; sleep($delay); }