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 comment:

  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.