18
Emails from the Door Bell Camera

Getting emails from your raspberry pi doorbell camera

Embed Size (px)

Citation preview

Page 1: Getting emails from your raspberry pi doorbell camera

Emails from the Door Bell Camera

Page 2: Getting emails from your raspberry pi doorbell camera

Sending emails from the Raspberry

PiRaspbian configuration

Page 3: Getting emails from your raspberry pi doorbell camera
Page 4: Getting emails from your raspberry pi doorbell camera

Installing and configuring SSMTP

Page 5: Getting emails from your raspberry pi doorbell camera

Make sure your repositories are up-to-date:

sudo apt-get update

Page 6: Getting emails from your raspberry pi doorbell camera

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

Edit the SSMTP configuration file:for Gmail

sudo nano /etc/ssmtp/ssmtp.conf

Page 8: Getting emails from your raspberry pi doorbell camera

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

Allowing less secure apps to access your accounthttps://support.google.com/accounts/answer/

6010255

Page 10: Getting emails from your raspberry pi doorbell camera

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

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

Building the projectfor

Emails from the

Door Bell Camera

Page 13: Getting emails from your raspberry pi doorbell camera

Hardware setupDoor Bell

Raspicam Button Blue Jumper Wire -> Ground Orange Jumper Wire -> Pin 1

Page 14: Getting emails from your raspberry pi doorbell camera

Starting Pointcamera with button

Page 15: Getting emails from your raspberry pi doorbell camera

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

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

The final Code

Page 18: Getting emails from your raspberry pi doorbell camera

The Email arrivesafter about a minute