Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^5: Trouble emailing zip file

by Paladin (Vicar)
on Jul 04, 2018 at 23:08 UTC ( #1217917=note: print w/replies, xml ) Need Help??

in reply to Re^4: Trouble emailing zip file
in thread Trouble emailing zip file

When using the LIST form of system() the first argument is the program to run, the rest of the arguments are the parameters for the program. I can almost guarantee you don't have a program called /usr/bin/mailx uuencode $zipfile $zipfile -r -s on your system. You probably have /usr/bin/mailx however. The other parts (uuencode $zipfile $zipfile -r -s) need to be passed as parameters to mailx.
my @emailcmd = ('/usr/bin/mailx', 'uuencode', $zipfile, $zipfile, '-r' +, '-s'); #and later my @args = (@emailcmd, $subject, $recipient); system(@args) == 0 or die "system @args failed: $?";

This is of course assuming that the command /usr/bin/mailx uuencode -r -s Subject Recipient indeed works on the command line.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1217917]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-05-25 19:34 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (90 votes). Check out past polls.