<pre name="code" class="sql">use Win32::Process::Info;
while (1==1){
use Sys::Hostname;
use HTTP::Date qw(time2iso str2time time2iso time2isoz);
use Net::SMTP;
if ( $#ARGV < 1 ){
print "please input 程序目录 程序名!\n";
exit(-1);
};
open( FILE, "<", "mail.conf" );
my @temp=<FILE>;
foreach (@temp) {
chomp $_;
($name,$passwd,$server) = split(/\s+/,$_);
};
close FILE;
print "\$name is $name\n";
print "\$passwd is $passwd\n";
print "\$server is $server\n";
sub send_mail{
if (@_ != 2){print "请输入2个参数\n";exit 1};
($m,$n) = @_; #将参数赋值给变量
my $to_address = $m;
my $CurrTime = time2iso(time());
my $to_address = $m;
my $mail_user = "$name";
my $mail_pwd = "$passwd";
my $mail_
Windows 万能守护进程
最新推荐文章于 2023-08-09 11:23:55 发布