使用perl的Mail::SendEasy模块来发送邮件
使用perl的Mail::SendEasy模块来发送邮件,首先需要确定已安装Mail::SendEasy模块[*]#! /usr/bin/perl -w
[*]
[*]use strict;
[*]print "mail to start............/n";
[*]use Mail::SendEasy;
[*]my $mail = new Mail::SendEasy(
[*] smtp => 'smtp.qq.com',
[*] user => '51cto@qq.com',
[*] pass => "51cto",
[*] );
[*]
[*]my $status = $mail->send(
[*] from => '51cto@qq.com',
[*] from_title => 'qq mail',
[*] to => 'admin@qq.com',
[*] subject => "$ARGV",
[*] msg => "$ARGV",
[*] );
[*]if (!$status) {
[*] print $mail->error;
[*]}
页:
[1]