EMail Script different users

Forum for questions and support relating to the 1.24.x releases only.
Locked
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

EMail Script different users

Post by jsylvia007 »

Howdy all! Just finished my implementation guide for 1.24.2 and 9.10 over on the wiki, and I thought now would be a good time to pick your brain.

One extreme limitation is that the events of the system can only be emailed to one user.

In my scenario, I have different groups of cameras responsible for different things, and I have shell scripts that basically just send an email that says "Hey you... Look at the camera" when something happens via the "execute command" option.

What I'd like to do is use the email functionality in ZM, but be able to chose a different email for each filter. I would like to use all the variables available, but choose the proper email address based on which filter was triggered.

Does anyone have a solution like this in place?
Flasheart
Posts: 342
Joined: Thu Jul 06, 2006 2:27 pm

Post by Flasheart »

If nobody can help with that, another workaround might be to use mailing list software or redirectors that accept the incoming email and redistribute it according to the content to the required parties.

I'm no postfix expert, but I imagine it would not be overwhelmingly difficult to parse emails using that and spread them around, or some other mail software.
rdmapes
Posts: 17
Joined: Sat Feb 09, 2008 10:04 pm

E-Mail Script

Post by rdmapes »

I e-mail messages to my phone and gmail account.

I found this script on the internet and used it with Motion. When I migrated to Zoneminder I tried it and it worked. I use it in the filter for each camera.

#!/bin/sh
DATE=$(date +"%Y%m%d%H%M%S")
ALARM_EMAIL="zoneminder_2.cam"
echo "Subject: Basement Motion Detected - $DATE" > $ALARM_EMAIL
echo "" >> $ALARM_EMAIL

echo "Basement Motion Detected - check $DATE" >> $ALARM_EMAIL
cat $ALARM_EMAIL | /usr/sbin/ssmtp User1@gmail.com User2@vtext.com

Works well for me. Maybe you will find it helpful or useful.

Forgot to mention that I also have SSMTP loaded and use that. Easy configuration.
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Post by jsylvia007 »

I take it that there isnt really a way to attach photos or use the Macro Variables from the command scripts though?
Locked