Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub send_mail { print "<pre>starting sub send_mail...\n"; # Localize variables used in this subroutine. + # local($print_config,$key,$sort_order,$sorted_field,$env_report); # Open The Mail Program # open(MAIL,"|$mailprog -t -f || die"" couldn't open mailprog $!") +; print "opening mail: $mailprog\n"; open (MAIL,"|/usr/ucb/mail -t") || warn "couldnt open mailprog: $! +\n"; print "opened mail\n"; #print MAIL "To: $Config{'recipient'}\n"; print MAIL "To: cgi_test\n"; print MAIL "From: $Config{'email'} ($Config{'realname'})\n"; print MAIL "Subject: TEST\n\n"; print MAIL "this is the body of the email\n"; # Check for Message Subject if ($Config{'subject'}) { print MAIL "Subject: $Config{'subject'}\ +n\n" } else { print MAIL "Subject: ONG TAC OUTAGE Form + Submission\n\n" } print MAIL "Below is the result of your feedback form. It was sub +mitted by\n"; print MAIL "$Config{'realname'} ($Config{'email'}) on $date\n"; print MAIL "-" x 75 . "\n\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open MAIL fails
by grinder (Bishop) on Jul 26, 2001 at 21:13 UTC | |
|
Re: open MAIL fails
by MZSanford (Curate) on Jul 26, 2001 at 21:11 UTC |