A web-based Python application
Python comes with a simple HTTP library that is perfect for creating a small web application. The web application, also known as a web service, is designed to provide a simple set of functionality: receive data, store it, and e-mail to confirm that it has received the data.
In Chapter 3, Central Air and Heating Thermostat, we used the HTTP server functionality of the Arduino to query the thermostat for data. In this chapter, we will be reversing the actions, where the Arduino will be posting to the Raspberry Pi.
Setting up SMTP
We recommend using an external e-mail service and connecting to it.
While you can host an SMTP server on your Raspberry Pi, you may find spam blockers will prevent the email for reaching its target.
Note
SMTP stands for Simple Mail Transfer Protocol. An SMTP server is an application that handles sending e-mails on the device it is installed on, for example, the Raspberry Pi.
There are various choices of external e-mail services, including...