Tuesday, June 26, 2012

How to send attachment with unix 'mail' command

We can send attachment with the uuencode command as below:

uuencode file-to-be-attached  file-to-be-attached | mail -s "subject" send-to -- -r send-from

the 1st parameter to uuencode is the file to be attached while the 2nd parameter is the filename seen by the recipient.

In case uuencode command is not found on your system, you can get it as below:

yum install sharutils


  1. Thank you very much for your information.
    Australia ETA/eVisitor Visa
    is quiet easy to apply online from Singapore,
    Malaysia, United Kingdom, United States, Canada, France and including all others ETA Eligible Countries from our website.

  2. admire views of the Yas Marina Formula 1 circuit and Ferrari World, and visit the Heritage Village to learn about Abu Dhabi’s pre-oil past and Bedouin beginnings. Informative guided commentary, round-trip transport, and Dubai hotel pickup and drop-off are included.abu dhabi city tour