public static void save(Mail mail,String filename) throws IOException{
		if(mail==null) return;
		File mfile = new File(filename);
		if(!mfile.exists()){
			mfile.createNewFile();
			ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(mfile));
			oos.writeObject(mail);
			oos.flush();
			oos.close();
		}else{
			ObjectWriter oos = new ObjectWriter(new FileOutputStream(mfile,true));
			oos.writeObject(mail);
			oos.flush();
			oos.close();
		}		
	}