Fixed javamail resource creation