Ubuntu Send Mail with Attachment from Command Line

  • sudo apt install mailutils
  • echo "My Body" | mail -s "My subject" me@example.com -A file.txt