Does such a thing exist?  I'd be interested in something like:You right-click a file in a file viewing manager, and click gmail yourself this file.  One click, and you're done.You open up the command-line, and type something like gmail ~/file.txt and file.txt is instantly sent to your own account.
One-Click Script to Gmail Yourself a File
shell;scripting;email
Well, this one is not exactly the way you want. But still it could be useful for the second option in your question. Install the required packages. sudo apt-get install msmtp-mtaEdit the following file to add the details. If the file doesn't exist, you could create it. vi ~/.msmtprc#Gmail accountdefaultslogfile ~/msmtp.logaccount gmailauth onhost smtp.gmail.comfrom your_address@gmail.comauth ontls ontls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crtuser your_address@gmail.compassword your_gmail_passwordport 587account default : gmailChange the permissions of the above file so that others couldn't read your user account details. chmod 600 .msmtprcNow, install a command line email program to write your email. sudo apt-get install heirloom-mailxNow, again edit/create the below file. vi ~/.mailrcAdd the below entries to the above file. set sendmail=/usr/bin/msmtpset message-sendmail-extra-arguments=-a gmailWe are done to send email from the command line. Testingmail -a hello.txt -s CHECKING recipient-mail-idENTER THE MAIL CONTENTS HERE. ctrl - d to finish the mail contents. Referenceshttp://tuxtweaks.com/2012/10/send-gmail-from-the-linux-command-line/