in reply to can't get mailx to send from within a script
Doesn't mailx need some input on it's STDIN, like the message for instance? I think you need to do something like (untested) :
open MAILX,'|/bin/mailx -s "hello" john@work.com' or die $!; print MAILX 'Your message here'; close MAILX or die "mailx: $! $?";
I would however recommend using another mechanism to send mail in your program, not limited to piping directly to sendmail or using a module such as Email::Send
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: can't get mailx to send from within a script
by Adrian (Initiate) on Aug 17, 2006 at 13:51 UTC |