I use Dropbox for accessing my files from any computer at any time, but unfortunately the hospital I work at blocks it. I found myself having to email files to myself often to be able to access them from the hospital network.

Using Hazel and a command-line tool called mutt, I now have a folder where I drop files to automatically email myself.

To set up mutt, use this Lifehacker guide.

Next, create a new Hazel rule with the following criteria:

and this embedded script:

LONG_FILENAME = "$1" VARIABLE = $( basename "$LONG_FILENAME" ) echo "See attached file(s). This is an automated message." | mutt -a "$1" -s "$VARIABLE" -- youremail@gmail.com

Just add your own email address, or one that you commonly send to, to the script. I have two folders like this, one to send to myself and one to send to my wife.

I like to keep these folders in the dock with a custom icon.

Update 2017-07-15:

I found a way to make this script more universal, with a user dialog to help you select from a list of frequent emails or searching contacts for someone else:

EMAIL = $( osascript -e 'set theList to {"Myself", "Wife", "Someone else"} set theChoice to choose from list theList if theChoice is {"Myself"} then set theEmail to "myemail@gmail.com" else if theChoice is {"Wife"} then set theEmail to "wifesemail@gmail.com" else if theChoice is {"Someone else"} then display dialog "Who would you like to send this to (First Last)?" default answer "" set theName to text returned of result tell application "Contacts" set thePerson to the first person whose name is theName set theEmails to value of emails of thePerson end tell choose from list theEmails set theEmail to result as text end if' ) LONG_FILENAME = "$1" VARIABLE = $( basename "$LONG_FILENAME" ) echo "See attached file(s). This is an automated message." | mutt -a "$1" -s "$VARIABLE" -- $EMAIL