Perl发送邮件模块比较
use Mail::Sendmail;
%mail = ( To => 'you@there.com',
From => 'me@here.com',
Message => "This is a very short message"
);
sendmail(%mail) or die $Mail::Sendmail::error;
print "OK. Log says:\n", $Mail::Sendmail::log;
2.Mail::Sender
这家伙能发送带附件的,不过得通过SMTP服务器,我测试了一下失败...
找到一个例子是用网易的,不过我测试一下Login not accepted...好吧
use Mail::Sender;
$sender = new Mail::Sender
{smtp => 'mail.yourdomain.com', from => 'your@address.com'};
$sender->MailFile({to => 'some@address.com',
subject => 'Here is the file',
msg => "I'm sending you the list you wanted.",
3
file => 'filename.txt'});
3.找到MIME::Lite.
初看一眼,丫看名字跟邮件好像关系不大.但是仔细一看丫貌似什么功能都有
靠..藏得太深了.我好不容易找到.这家伙好用极了!
use MIME::Lite;
$msg = MIME::Lite->new(
From => 'me@myhost.com',
To => 'me@ahaha.com',
#Cc => 'some@other.com, some@more.com',
Subject => 'you have got a message',
Type => 'multipart/mixed'
);
### Add parts (each "attach" has same arguments as "new"):
$msg->attach(
Type => 'TEXT',
Data => "Here's the GIF file you wanted"
);
$msg->attach(
Type => 'AUTO',
Path => '111.txt',
Disposition => 'p_w_upload'
);
### use Net:SMTP to do the sending
$msg->send();
Perl发送邮件模块比较
精选 转载文章标签 职场 休闲 Perl 邮件模块 比较 文章分类 服务器
1.Mail::Sendmail,用这个模块发邮件很简单,可是貌似也只能处理简单的邮件...
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
perl模块发邮件
perl模块发邮件
perl模块发邮件 -
利用perl模块发邮件
利用perl模块发邮件
模块 发邮件 perl