I\'ve created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them togeth
mysqldump
I use mpack.
mpack -s subject file user@example.com
Unfortunately mpack does not recognize '-' as an alias for stdin. But the following work, and can easily be wrapped in an (shell) alias or a script:
mpack -s subject /dev/stdin loser@example.com < file