public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		MailsenderForm mailsenderForm = (MailsenderForm) form;// TODO Auto-generated method stub
		
		String email = mailsenderForm.getEmail();
		String login = mailsenderForm.getLogin();
		String subject = mailsenderForm.getSubject();
		String note = mailsenderForm.getNote();
		
		System.out.println(login);
		
		TextToSpeech tts = new TextToSpeech();
		Logger log = Logger.getLogger(TextAction.class);
		Mailer mailer = new Mailer();
		Date da =new Date(); 
	    //SimpleDateFormat sim= new SimpleDateFormat("dd/MM/yyyy");
		
		String stop="No, exit the program," +
				" stop recording, nothing to say, no command to say," +
				" no command to tell.";
		String valid="Yes, it's okay, edit the field, change the field," +
				"if it's okay, thank you";
		//String mails= "";
		
		tts.playSynth(login);
		
		CompteDAO codao = new CompteDAO();
		Compte comp = codao.findById(login);
				
		request.getSession().setAttribute("email", "example@mail.com");
		request.getSession().setAttribute("subject", "Subject");
		request.getSession().setAttribute("note", " ");
		request.getSession().setAttribute("valid", " ");
		
		Reader read = new Reader();
		
		tts.playSynth("Hello, if you like to edit the field say Edit");
		String text = read.Listen(valid, stop, 5000);
		if (!text.equals("wrong")){
			
			tts.playSynth("Speak the mail address");
			text = read.Listen("gmail", stop, 8000);
			email= text;
			request.getSession().setAttribute("email", email);
			
			tts.playSynth("Speak the Subject");
			text = read.Listen(" ", stop, 15000);
			subject= text;
			request.getSession().setAttribute("subject", subject);
			
			tts.playSynth("Speak the email content");
			
			while (!text.equals("wrong")){
				text = read.Listen(" ", stop, 30000);
				note+=text;
				tts.playSynth("Are you finished");
				
				text = read.Listen(stop, valid, 5000);
				
			}
			request.getSession().setAttribute("note", note);
			
			tts.playSynth("Do you want to send the Mail now??");
			text = read.Listen(valid, stop, 5000);
			if (text.isEmpty()){
				return mapping.findForward("done");
			}
			
		}
		
		Email mail = new Email();
		
		mail.setSujet(subject);
		mail.setDateDEnvoi(da);
		mail.setSendAdresse(email);
		mail.setContenu(note);
		mail.setCompte(comp);
		
		Session hsf = HibernateSessionFactory.getSession();
		Transaction trans = hsf.beginTransaction();
		hsf.saveOrUpdate(mail); 
		trans.commit();
		hsf.close();
		
		
		mailer.MailSender(comp.getAdresseMail(), comp.getMailpassword(), comp.getAdresseMail(), email, subject, note);
		
		request.getSession().setAttribute("valid", "Your mail has been sent");
		log.info("User " + comp.getNom() + comp.getPrenom() + " with the login " + comp.getLogin() + " has just send a mail.");
		tts.playSynth("Your mail has been sent");
		
		return mapping.findForward("done");
	}