Python Project 01: fileEmailer


image displaying a phone and Spark AR logo

In 2020, I'm learning new things


This year I'm gonna be spending a lot of time learning cyber security, Python, and a ton of other things. I spent the last few months really trying to nail down the basics of Python, until this last week when I finally decided to test my knowledge by building a program to automate a process I do often.


The program


So, I alternate between my Macbook and my PC frequently since I use each for different tasks. For example, I design my website's project photos on my laptop, but update my site using my PC (meaning I have to send files over). I also write my papers/assignments on my PC but send them to friends over text (I don't know my friends' emails, we don't email each other lol).

Often this results in me spending more time than I'd like sending myself files through email since I don't use Dropbox/Drive file stream/others for one reason or another. This can take away from my immersion when working on a project and can impact my focus as well. I found myself wondering how I'd go about automating this task using Python, to save some significant time and to prevent losing focus when task switching. What if as soon as I saved my file to a specific location my program would attach it as an email and send it to myself so within seconds I could text a friend the file?... without leaving the project I'm working on, of course.



Here's what happens. The program is running in the background "listening" for a new file to show up in a specific folder I set up. When I save my Word document to the set location, the program starts executing the code that would attach and send it to me!


(the program can also send videos, PDFs, images etc)


Next the notification shows up on my phone, I open the file, quickly text it to a friend and get back to it. GGEZ. But really, if I'm working with a word document all I have to do is "save as" to the folder the program is listening to and within seconds it shows up on all my devices. Not bad! I can also simply drag and drop files into the specified location and it will go ahead and send it to me.




Moving forward


This was my first "from idea to working program" project, and I definitely look forward to building more challenging programs in the future. Despite this version of the project being done, there is one thing I'm going to add to the program.

I want to be able to input a contacts name into the program and have it send the file directly to them (over email or phone). I already have an idea of how to go about this so it's only a matter of time before it gets updated!






Click the icon below to check the code out on GitHub!