For this project, I used a moisture sensor made from cork bark, which had two electrical leads embedded in it that acted as a sort of switch. When the soil was wet, the switch closed, and when it became dry, the switch opened. I connected the moisture sensor to the Raspberry Pi Pico W to monitor the moisture level.

Once the Pi Pico W detected that the moisture level had dropped too low, it sent an HTTP POST request to an AWS Lambda Function. The Lambda Function listened for events from the Pi and triggered an email notification to be sent out. Once this request was sent it waited for the plant to be watered before resetting and being ready to send another request. This way it will only send one email, and won't fill your inbox with thousands of emails

Using AWS Lambda to send email notifications was an ideal solution because it eliminated the need for any  hosting of email servers within my local home network. The Lambda Function was triggered automatically when the Pi Pico W sent an HTTP POST request, ensuring a reliable and secure method of sending email notifications. There are definitely other ways you could set this up to send out notifications but this was a quick and easy way for me to do it that didnt require any special config on my home network, or client device.