--- android/TrainInfoService/src/dk/thoerup/traininfoservice/CircuitBreakerListener.java 2011/10/02 12:44:57 1606 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/CircuitBreakerListener.java 2011/10/04 17:35:31 1607 @@ -41,8 +41,12 @@ notif.addNotifier( new JavaLogNotifier() ); //only send mail on prod server - if (sce.getServletContext().getRealPath("/").startsWith("/home/app/") ) { - notif.addNotifier( new MailNotifier("traininfo@t-hoerup.dk", "torben@t-hoerup.dk", "192.168.10.5") ); + if (sce.getServletContext().getRealPath("/").startsWith("/home/app/") ) { + String mailRecipient = settings.getMailRecipient(); + + if (mailRecipient != null && (!mailRecipient.isEmpty() ) ) { + notif.addNotifier( new MailNotifier("traininfo@t-hoerup.dk", mailRecipient, "192.168.10.5") ); + } } LoggingCircuitBreaker banedk = new LoggingCircuitBreaker("banedk", settings);