linux send attachment from command line

C++
#install mutt sudo apt-get install mutt
mutt -s "the subject" -a myattachment.zip -- [email protected] <<< "some message"
Source

Also in C++: