Motion - Motion Event Mailer
You are here: Foswiki>Motion Web>MotionEventMailer (14 Jan 2006, AngelCarpintero)Edit Attach

Motion Event Mailer in PHP

Introduction

Simple Php which compresses and mails event pictures at the end of an event

Tired of logging onto your website to see what happened the last time an event took place, but you would like to know straight away? This script is for you...

What does it do?

This simple CLI php script creates a tarball of the pictures taken during the last event, compresses them and mails them to the address you specify. Most people could write something this simple themselves, but this may save them a few minutes.

I intend adding a few more features in the future, as well as a simple install script so that this doesn't need to be modified itself.

Please note

The majority of this code is thanks to the php mailer class http://phpmailer.sourceforge.net/ and all the developers who contributed to this project. I am but a humble modifier of their genius.

This does not mean that support queries should be directed to them as they have nothing to do with this specific project.

Attached Files

Zip file containing the following:

Installation

You need to install PHP with command line interface and the PHP mailer class

Installing PHP with CLI

Please see: http://www.phpbuilder.com/manual/ for instructions to install this.

Installing PHP mailer class

Please see http://phpmailer.sourceforge.net/ (this is included in the zip file)

How do you install the program? (assume talking to a newbie)

  • Copy the php mailer files into your php classes directory (for inclusion) (This is the path specified in your php.ini file under include_path)
  • Copy the zipper.php to a location of your choice (which can be reached by the user you are running motion with)
  • Edit zipper.php and change the sender address, recipient address and smtp server to ones of your choice (Please take close note of comments in the file and edit accordingly)
  • Modify the on_event_end option in your motion.conf or relevant thread file to to reflect the following:
    on_event_end php /location/to/zipper.php "%v-%Y%m%d"
    (Please note that the conversion specifier must be the same as that of the beginning of the file names being saved)

Users Guide

No further requirements

Comments and Bug Reports

I will be clearing up the installation instructions shortly as well as making the variables more clear inside of the MotionEventMailer script. Please be patient and mail me should you require clarification.

I have given you a helping hand with the formatting.

The attached files contains software (PHP mailer and PHP SMTP class) which is under the LGPL license. Note that you need to include the LGPL license as it is described in the headers of the two files. Otherwise you (and I) violate the license. Just include the LICENSE file in your next ZIP and you are OK. It is as simple as that.

-- KennethLavrsen - 10 Jan 2006

Thanks for the help and pointers Kenneth. I have tried to update the previous files with no luck, but have uploaded a new one with license included. Please feel free to remove the previous ones as I seem unable to do this. Thanks once again.

-- BrendonBaker - 14 Jan 2006

RelatedProjectsForm edit

ProjectSummary Simple Php which compresses and mails event pictures at the end of an event.
ProjectStatus Alpha
ReleaseVersion 0.002
ProjectSubmitter BrendonBaker
I Attachment Action Size Date Who Comment
motioneventmailer002a.zipzip motioneventmailer002a.zip manage 25 K 14 Jan 2006 - 08:39 UnknownUser Version 0.002a (Please use latest)
Topic revision: r6 - 14 Jan 2006, 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.