deles 发表于 2018-8-31 12:18:53

使用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]
查看完整版本: 使用perl的Mail::SendEasy模块来发送邮件