Customer Notification System.

R. Scott Evans nanog at
Wed Feb 22 15:34:32 UTC 2012

What, no programmers in your NOC to roll your own?


use DBI;

# define variables ($sendmail, $from, $database... etc)

$dbh = DBI->connect("DBI:mysql:$database:$server", $user, $pass);
$mysearch = $dbh->prepare("SELECT customer,cid,email FROM $table WHERE

while (($customer,$cid,$email) = $mysearch->fetchrow_array) {
	open(MAIL, "| $sendmail -t");
	print MAIL "From: $from\n";
	print MAIL "To: $email\n";
	print MAIL "Subject: $subject\n\n";
	print MAIL "$customer,\nYour circuit $cid is going down bla bla bla.";

** NOTE - this is off the top of my head, ie.. not tested.  That said,
it's more or less a simplified version of what we do. 


On Tue, 21 Feb 2012 17:58:19 -0500, "James Wininger"
<jwininger at> wrote:
> We are a smaller ISP in Indiana. We are growing quite rapidly (yeah for
> us). We have a need for a customer notification system. We have simply
> out grown the ability to send emails to our customers manually. We need
> to have a better way of notifying our customers of maintenance etc.
> We would need to send notifications out to say about 400 customers.
> Ideally the system would send an attached PDF. It would be great if this
> system were SQL based etc.
> Does anyone know of a system that is out there that does this? We have
> looked at a few applications (windows based) but integration with
> billing etc seems to be a caveat. I have thought of possibly using a
> mailing list type approach, but that gets us back to (almost) where we
> are today. Any pointers would be greatly appreciated. 
> --
> Jim Wininger
> jwininger at

More information about the NANOG mailing list