You can try this:
mail name@mailserver.com -s "Attached file" <<EOF
Hi
~| uuencode $HOME/filename.txt filename.txt
EOF
It works with GNU Mailutils, check the website for more information.
You can try this:
mail name@mailserver.com -s "Attached file" <<EOF
Hi
~| uuencode $HOME/filename.txt filename.txt
EOF
It works with GNU Mailutils, check the website for more information.