public void sendMail() {
        if (userName == null || userIndexId == 0) {
            FacesContext context = FacesContext.getCurrentInstance();
            context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Please Select Member First", ""));
        }
        if (discription.equals("")) {
            FacesContext context = FacesContext.getCurrentInstance();
            context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Message Cant be empty", ""));
        } else {
            HttpSession session = scopeUtil.getSession(false);
            GenericDAO<Mail> mailDAO = new MailDAO();
//        Mail m = (Mail) mailDAO.findById(Mail.class, mailId);
            Mail m = new Mail();
            User toUser = new User();
            User fromUser = new User();
            toUser.setUserId(userIndexId);
            fromUser.setUserId(((User) session.getAttribute("userInfo")).getUserId());
            m.setTo(toUser);     // saving the status of To user
            m.setFrom(fromUser); // saving the status of  send by user
            m.setDiscription(discription);
            mailDAO.add(m);
            FacesContext context = FacesContext.getCurrentInstance();
            context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Mail has been sent", ""));
            reset();
        }
    }