标签:
#!/usr/bin perl -w
use strict;
use Mail::Sender;
#use MIME::Base64;
my $sender = new Mail::Sender({
#smtp => ‘smtp.163.com‘,
smtp => ‘mfast.163.internal‘,
from => ‘mail@service.netease.com‘,
fake_from => ‘"网易邮件中心"<mail@service.netease.com>‘,
debug=> \*STDOUT,
debug_level => 3,
to => ‘XXX <gzliyawen@corp.netease.com>‘,
#maxiaoqin
cc => [
‘XXX <gzliyawen@corp.netease.com>‘,
],
client => ‘Young‘,
on_errors => ‘die‘,
}) || die "Create sender: $Mail::Sender::Error";
my $subject = shift;
#my $subject= ‘一元夺宝web wap端各渠道转化数据统计需求‘;
$Mail::Sender::NO_X_MAILER = 1;
=head
$sender->OpenMultipart();
$sender->Body({
charset => ‘gbk‘,
encoding => ‘Base64‘,
#ctype => ‘‘,
msg => "请见附件",
});
=cut
#if ($sender->MailMsg({
my $files = join(‘,‘,@ARGV);
if ($sender->MailFile({
subject => $subject,
#encoding => ‘Base64‘,
#charset => ‘gbk‘,
file => $files,
msg => "file attached",
}) < 0) {
die "$Mail::Sender::Error\n";
}
#$sender->Close();
print "Mail sent OK."
file_list="result_kaijiang_`date -d"$cur_date -1day" +%F`.txt result_liushui_`date -d"$cur_date -1day" +%F`.txt";
echo ${file_list}>tmp
list=`sed ‘s/\n/,/g‘ tmp`
javamail "一元夺宝每日流水组成-商品分布数据统计数据" $list gzliyawen@corp.netease.com
file_list="result_kaijiang_2015-08-25.txt result_liushui_2015-08-25.txt";echo ${file_list}>tmp;list=`sed ‘s/ /,/g‘ tmp`;echo $list
./isql.sh -utongji_lch -ptongji_lch -h10.110.9.91 -o8886 -l dirpath -e "select id from prize_type where name like ‘%考拉海购%‘"
标签:
原文地址:http://www.cnblogs.com/liyawen215/p/4813293.html