然后写一个脚本,如run.sh 测试可以用 run.sh echo ftp01>>ftp.txt df -h >>ftp.txt mail -s "FTP01" xxx@eee.cn <ftp.txt rm ftp.txt ============================================= 指定邮件服务器发邮件 使用软件 pine-4.33 ============================================================ Linux发送邮件脚本: #!/usr/bin/perl $filename_1 = `/bin/cat --''.$boundary.'' ''; |
叶子博客上的自动发报告邮件的脚本实例
#################################################################### $mime='MIME-Version: 1.0 Content-Type: multipart/mixed; boundary='.$boundary.' Content-Transfer-Encoding: 8bit
--'.$boundary.'
Content-Type: application/octet-stream; name="'.$filename1.'" Content-Transfer-Encoding: base64 Content-Description: '.$filename.' Content-Disposition: attachment; filename="'.$filename1.'"
';
close (FILE);
system "cat /root/tools/analog_report_log >> /root/tools/analog_report_oldlog";
|