PDA

View Full Version : Pager notifications



s1rk3ls
11-07-06, 01:02 AM
I wanted a way to have new order and ticket notifications sent to my pager or cell-phone - As both my pager and cellphone each have an actual email address, this is easy to do without worrying about SMS or other such things.

My problem was that I only wanted a "one liner", not a full-text copy of the order or ticket... So here's what I've come up with so far:

In the templates folder, I added the following lines to the bottom of supportticketsubmit-confirm.tpl


{php}
mail("[email protected]", "New Support Ticket", "New support ticket, #$tid at mydomain.com");
{/php}

Now, this covers tickets entered via the "submit ticket" link in the support system, but what about emails piped in?

This one was a little trickier - but ended up being so simple :)

in the pipe folder, I renamed pipe.php to pipe1.php and created a new pipe.php with the following contents:


<?php
mail("[email protected]","New Support Ticket", "New support ticket submitted via email");
include("pipe1.php");
?>

So far, this takes care of notifying me of any support tickets - and notifications for orders are easy as there is already a checkout script which you can enable in the admin (checkoutscript.php in the includes folder)

I just added the following to the bottom:


mail("[email protected]","New Order", "New order placed at mydomain.com");

MACscr
11-07-06, 06:25 AM
Whats wrong with getting the first 160 characters (standard for SMS AFAIK)? This is what i get for all my notifications.

s1rk3ls
11-07-06, 08:41 PM
with my cell service - since it's coming across as an email not an SMS, it tries to give me everything - so if someone types up a particularly long trouble ticket, I end up with 4-5+ text messages (1 of 5, 2 of 5, etc) when all I really wanted was a simple notice that someone sent something so I can step into the next room and look at the computer screen.

getweb
12-30-07, 05:48 AM
Excellent idea, just what I needed. I actually took it further to get the ticket subject, author, and first bit of the message content into the txt message. My messages are limited to 160 characters so this format gives me most of what I need to know at a glance (so I can differentiate between "server down" tickets and "how do I change color?" :lol: )



{php}
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$arrdetail = $this->get_template_vars('clientsdetails');
$fullname = $arrdetail['firstname'] . " " . $arrdetail['lastname'];

mail("[email protected]", "$subject", "From $fullname: $message");
{/php}

internetbrother
12-30-07, 08:53 AM
what if I want to get notification through google chat only