From b336f5e23bcc190c6c12ea5e9686f0a325c9bd89 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jan 2008 11:26:46 -0600 Subject: [PATCH] Import version as of 2008-01-08 for upload-ftp-v1.1.pl --- upload-ftp-v1.1.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/upload-ftp-v1.1.pl b/upload-ftp-v1.1.pl index de9cbd4..8063c16 100755 --- a/upload-ftp-v1.1.pl +++ b/upload-ftp-v1.1.pl @@ -563,7 +563,7 @@ sub read_directive_file { &fatal("$slash_count slashes is too many, in $val",1,$directive_file_contents) if $slash_count > 3; # Only let them specify one directory directive. - &fatal("invalid second directory $val, have $info{directory}",1,$directive_file_contents) + &fatal("Only one directory directive is allowed per directive file. Error at directory directive: $val",1,$directive_file_contents) if exists $info{"directory"}; $info{"directory"} = $val; # ok. @@ -576,7 +576,7 @@ sub read_directive_file { my $val = $1; # so far so good # Only let them specify one filename directive. - &fatal("invalid second filename $val, have $info{filename}",1,$directive_file_contents) + &fatal("Only one filename directive is allowed per directive file. Error at filename directive: $val.",1,$directive_file_contents) if exists $info{"filename"}; $info{"filename"} = {"value" => $val, "order" => $cnt++}; # ok. @@ -991,16 +991,16 @@ sub fatal { sub mail { my ($msg) = shift; my ($send_to_user) = shift; - my ($subject) = shift; - $subject ||= ''; + my ($subject) = shift; + $subject ||= ''; my @email_list = ($email_always); - # Some messages should be sent to the user, some should not + # Some messages should be sent to the user, some should not push (@email_list, @{$info{email}}) if (defined $info{email} && $send_to_user); # print STDERR "final emails: @email_list\n"; # return @_; - + my $smtp = Net::SMTP->new ("127.0.0.1"); ftp_die("FATAL: SMTP connection failed") unless $smtp; -- 2.25.1