UNIX mail command

I am using HP-UX server. I tried to send the email with attachment, I used the below unix command to send with attachment but it doent work.

 
uuencode pepsitoday.csv | mailx -s "csv file" ramkumar15@pepsi.com
 

---------- Post updated at 02:10 AM ---------- Previous update was at 01:46 AM ----------

I have tried this but still the file is not sent with attachment

 
uuencode /home/ss/pepsi.csv pepsi.csv | /usr/bin/mailx -s "csv" ramkumar@pepsi.com
 

Did you consider reading the man page (esp.: -a file Attach the given file to the message.) or looking into the proposals at the bottom of this page?

1 Like

Have you done a search on this forum for uuencode or mailx? I would bet that you would find many examples.