Upload
barbara-hohensee
View
131
Download
0
Embed Size (px)
Citation preview
Emails from the Door Bell Camera
Sending emails from the Raspberry
PiRaspbian configuration
Installing and configuring SSMTP
Make sure your repositories are up-to-date:
sudo apt-get update
Install SSMTP and mail utilities:
sudo apt-get install ssmtp
sudo apt-get install mailutils
Edit the SSMTP configuration file:for Gmail
sudo nano /etc/ssmtp/ssmtp.conf
edit the ssmtp.conf
your GMail address
your GMail addressmatching password
add this 3 lines
Allowing less secure apps to access your accounthttps://support.google.com/accounts/answer/
6010255
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
Sending an attachment file
echo "Image attached" | mail -A Maja10.jpg -s “Door Bell" [email protected]
Building the projectfor
Emails from the
Door Bell Camera
Hardware setupDoor Bell
Raspicam Button Blue Jumper Wire -> Ground Orange Jumper Wire -> Pin 1
Starting Pointcamera with button
Standard image size
The code produces an image with the size of about 2.7MB
Gmail restriction for attachment: 25MB
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”)
The final Code
The Email arrivesafter about a minute