getting emails from your raspberry pi doorbell camera
TRANSCRIPT
![Page 1: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/1.jpg)
Emails from the Door Bell Camera
![Page 2: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/2.jpg)
Sending emails from the Raspberry
PiRaspbian configuration
![Page 3: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/3.jpg)
![Page 4: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/4.jpg)
Installing and configuring SSMTP
![Page 5: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/5.jpg)
Make sure your repositories are up-to-date:
sudo apt-get update
![Page 6: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/6.jpg)
Install SSMTP and mail utilities:
sudo apt-get install ssmtp
sudo apt-get install mailutils
![Page 7: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/7.jpg)
Edit the SSMTP configuration file:for Gmail
sudo nano /etc/ssmtp/ssmtp.conf
![Page 8: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/8.jpg)
edit the ssmtp.conf
your GMail address
your GMail addressmatching password
add this 3 lines
![Page 9: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/9.jpg)
Allowing less secure apps to access your accounthttps://support.google.com/accounts/answer/
6010255
![Page 10: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/10.jpg)
2 ways to send an text email
echo "Hello world email body" | mail -s "Test Subject" [email protected]
mail -s "Message from your Door Bell" [email protected] < message.txt
body
body
![Page 11: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/11.jpg)
Sending an attachment file
echo "Image attached" | mail -A Maja10.jpg -s “Door Bell" [email protected]
![Page 12: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/12.jpg)
Building the projectfor
Emails from the
Door Bell Camera
![Page 13: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/13.jpg)
Hardware setupDoor Bell
Raspicam Button Blue Jumper Wire -> Ground Orange Jumper Wire -> Pin 1
![Page 14: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/14.jpg)
Starting Pointcamera with button
![Page 15: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/15.jpg)
Standard image size
The code produces an image with the size of about 2.7MB
Gmail restriction for attachment: 25MB
![Page 16: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/16.jpg)
Inside the C program using the mail command and system function you can
send the mail to the user.
system(“mail -A Maja10.jpg -s ‘Door Bell’ [email protected] < message.txt”)
![Page 17: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/17.jpg)
The final Code
![Page 18: Getting emails from your raspberry pi doorbell camera](https://reader036.vdocuments.net/reader036/viewer/2022070509/58a29cab1a28ab0d0a8b45d9/html5/thumbnails/18.jpg)
The Email arrivesafter about a minute