Sending An Email Using Python On The Raspberry Pi
Wouldn’t it be nice if your project could email you when it is done a task, has a problem, or just randomly thought the day? Well, with the Raspberry Pi, this is something that can be easily set up with a little Python code and an extra Gmail account. In this tutorial we will go through the steps of setting up a chunk of code that can be easily configured to send an email on command in any Python project!
There are a lot of different operating systems out there for the Raspberry Pi, so we are going to focus on the most popular: Raspbian. We are using the version dated: 2019-7-10 (Pi 4 Compatible) available from the Raspberry Pi Foundations’ Download Page. You don’t need to use the Raspberry Pi 4, any Raspberry Pi will do. However, deviating from the recommended operating system version may result in different / additional steps so if you are very new to this, we recommend following the tutorial exactly.
If you have any questions, or need further clarification please post in the comments section below; this way future users of this tutorial can see the questions and answers!