bikeguy has asked for the wisdom of the Perl Monks concerning the following question:
$dirname = ARGV[0]; $fname = ARGV[1]; ... $status = system("mail -s \"test subject\" < $dirname$fname");
Now, if I run this from a command line it works fine. However, if this is in a separate program called from a CGI script, it sends an empty email and reports back that the email will have a null body.
I would like to avoid using any modules here, and the problem with piping it back through is that I would need to read the file I'm trying to use as the message body. Not a huge deal, but if I can accomplish this as one line I'd like to.
Does anyone have any ideas as to why this won't run under this circumstance? I have even tried hardcoding the filename in, same thing. I'm stumped!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Yet another email question
by amphiplex (Monk) on Jul 23, 2002 at 09:42 UTC | |
by Aristotle (Chancellor) on Jul 23, 2002 at 13:49 UTC | |
|
Re: Yet another email question
by Ionitor (Scribe) on Jul 23, 2002 at 14:55 UTC |