send file as attachment mail bash code example
Example: how to send email with body and attachment in unix
$ ( cat body-message.txt; uuencode input-attachment.txt output-attachment.txt ) \
| mail -s "Email With Body Text and Attachment" [email protected]