Motion - Support Question 2009x 05x 13x 160223

emailing of pictures

Question

ok im, having to be quick as im off to work 5 minutes ago

how do i get it to email the pictures that motion saves to my email address? im guessing i would have to install a smtp client into ubuntu (though sabnzbd seems happy to use my gmail settings smile )

all i want to do is for motion upon detecting motion to email me a picture of said motion since i use gmail and have several gigs of space storage shouldnt be an issue

any help greatfully recieved please email me the reply as i can check email at work (another reason to have motion email me lol)

Dave (mrgreaper2004@gmail.com )

***************************************************************

in reply to the answer (sorry can only edit cant figure out how to reply on this forum!)

http://www.lavrsen.dk/foswiki/bin/view/Motion/SendJpegPythonScript seems the best bet the otheres i dont understand at all this one atleast i can sort of see how it works but theres no installation guide other then it says to add -e or motion.conf but explanation of where to add to to the motion.conf (im guessing you cut and past the contents to the end of the file?) also i can see where to add the smtp for the mail server but no where to add the autorisation settings (i use gmail so i need to set port password etc)

please i am a linux newb i just want to use motion to make sure that if i get robbed while at work or when on holiday i get notified by email fast and have the pictures of who done it, there has been a lot of robberies in my area i need this piece of mind please help me set this up

Paste in your error messages, config settings, terminal window output etc in this text field.

Environment

Motion version: 3.2.11
ffmpeg version:  
Libraries: ffmpeg, mysql, postgresql
Server OS: ubuntu 9.04

-- DavidEastwick - 13 May 2009

Answer

- Firstly, maybe you must read here :

http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionEventMailer

http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionMail

http://www.lavrsen.dk/foswiki/bin/view/Motion/SendJpegPythonScript

-- FlorinAnton - 13 May 2009

**********************************

- Quick and Dirty Solution :

**********************************

- install mutt

- install putmail.py

- in /usr/local/etc/Muttrc file ,insert 2 lines :

set sendmail="/usr/local/bin/putmail.py"

set sendmail_wait=0

- in your /$HOME/.putmail/putmailrc file, insert this :

[config]

server = smtp.gmail.com

email = youraddress@gmail.com

username = youraddress@gmail.com

password = yourpassword

port = 587

tls = true

- in your /home folder, create a new file called motion_mail.sh with this content :

#!/bin/sh

mutt -s "MOTION DETECTED..." -a /mnt/hda4/cam1/lastsnap.jpg youraddress@gmail.com < /usr/local/etc/test.txt

- in /usr/local/etc/ create a new file called test.txt with this content :

WARNING EMAIL : MOTION HAS BEEN DETECTED !!!...

- in /usr/local/etc/motion.conf file insert this line :

on_event_end /home/motion_mail.sh

- in fact, yes, your mail address from gmail will send itself an email with file lastsnap.jpg attached...

- suplemental read :

http://wiki.mutt.org/?LightSMTPagents

http://rubbernecking.info/2007/02/using-putmailpy-with-mutt.html

http://www.cyberciti.biz/tips/sending-mail-with-attachment.html

-- FlorinAnton - 17 Jun 2009
Topic revision: r5 - 09 Jul 2009, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.