Hi,
You need to modify the script to something similar to below code. But even after this the mail envelope and body containing the attachment you create will display as text will not add to the message envelope. So you wont be able to get the excel file as an attachment. This is because the mailer already creates an envelope and separates it from the content by adding an empty line in between.
If you want to get the content as text and the excel file as attachemnt try this line instead:
( echo "Text Content"; uuencode example.xlsx example.xlsx ) | mailx -s "test xlsx" [email protected]Cheers,
K.