Changed to send email if any connections are open instead of for each open connection.