Mail files to Dropbox

   I love Dropbox. It is a great way to share files with and between iOS devices. Dropbox is also available as a service for other apps so I hope it will become a standard way to share files between devices and even maybe between apps on the same device.

   However one feature that Dropbox is currently missing is a way to send files to Dropbox by email. Most iOS apps allow you to save files and attach them to an email. So if these attachments could end up automatically in Dropbox, wouldn't it be great? So let's do it.

   My first step was to create a dedicated Gmail account. A separate email account is not strictly required but it makes things easier and it's free, so why not do it. In Gmail, you need to enable POP and then configure Mail to fetch the emails in that account. For detailed instructions, go there. Note that you can choose if you want to delete emails once they are downloaded. I chose to just archive them as a backup. Also I chose a long, random Gmail address to avoid getting spam to soon. I will never use that address for anything else so it will be interesting to see how long it will take spammers to find it.

   I am not a big fan of Mail on the Mac but in that case it's perfect for two reasons. One I have a Mac Mini running 24/7 at home (it's my media center) so it can process the mails immediately. The other nice feature of Mail is that you can create rules in Mail that include AppleScript actions. Apple is kind enough to provide some examples of these rules in the folder /Library/Scripts/Mail Scripts/Rule Actions. You can download my new rule here. Open the script with the AppleScript Editor. It is pretty self explanatory. You can easily customize the location of your Dropbox folder etc. Then click on the 'Compile' button. If everything looks in order, save it in the folder /Library/Scripts/Mail Scripts/Rule Actions as a .scpt file.

   The last step is to create the rule in Mail and voila!

   I hope you will find this hack useful. Please share your comments and improvements.

Short URL for this post: