add monitoring code and javamail lib