Send file as attachment from commnad line


There’s an easy way of sending files as attachment from command line:

uuencode file name | mail -s "Subject" "to@tld.cz"  -- -ffrom@tld.cz

Yes, there is double hyphen and -f before the from email address.

bash  mail