public static String getEmailInfo(String proname){
String url = "";
InputStream in=null;
try {
Properties prop = new Properties();
in = Thread.currentThread().getContextClassLoader().getResourceAsStream("email.properties");
prop.load(in);
url = prop.getProperty(proname);
} catch (Exception e) {
e.printStackTrace();
throw new ExceptionInInitializerError();
}finally{
if(in!=null)
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return url.trim();
}