Chinaunix首页 | 论坛 | 博客
  • 博客访问: 466904
  • 博文数量: 279
  • 博客积分: 4467
  • 博客等级: 上校
  • 技术积分: 2830
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-03 14:43
文章分类

全部博文(279)

文章存档

2013年(1)

2012年(39)

2011年(35)

2009年(29)

2008年(131)

2007年(44)

分类:

2008-01-07 11:44:52


#!/usr/bin/perl

use MIME::Lite;
use Net::SMTP;
my $from_address = 'seven.zhang@uniforce.net';
my $to_address = 'pilot3@spam-dev-1.hk.uniforce.net';
my $mail_host = 'nxserver.sh.uniforce.net';
my $subject = 'subject: 5i envelope sender rewrite test';
open(A,"a5i.txt") or die "cannot open a5i.txt$!\n";
$file=<A>."\n";
foreach(1..100){
$msg = MIME::Lite->new (
  From => $from_address,
  To => $to_address,
  Subject => $subject,
  Type =>'multipart/mixed'
) or die "Error creating multipart container: $!\n";
$msg->attach (
  Type => 'PLAIN/TEXT',
  Data => $file,
) or die "Error adding the text message part: $!\n";

### Send the Message

MIME::Lite->send('smtp', $mail_host, Timeout=>60);
$msg->send;
}



阅读(137) | 评论(0) | 转发(0) |
0

上一篇:DBI::mysql

下一篇:change encoding and insert mysql

给主人留下些什么吧!~~