- Login to your Gmail account by entering your login credentials.
- Click on your profile picture and then click on “Google account”.
- Under “Sign-in and Security” click “Connected apps and sites”.
- Click “Allow less secure apps” to turn it on.(By Default its Turn off)
- Components Required for Raspberry Pi Camera And PIR Sensor to Send Emails
|How to Use the Raspberry Pi4 Camera And PIR Sensor to Send Emails|
A 5V Buzzer is connected to GPIO20 And Raspberry pi4 Camera Connect to the PI Connector Slot. The other pin of the buzzer connected to GND.
The Python Code to Send Emails
Before running the code, make sure the sender and receiver email addresses and the password of the email sender are all entered.
The code will read the output from the sensor and, upon detecting motion, will capture an image and save it on the database folder.
When you run the code for the first time, it will automatically create the folder. Once the camera captures an image, the image will be attached in the email and sent to the sender’s address.
My Previous Project :
98 total views, 1 views today