@Override
    public void actionPerformed(ActionEvent e) {

        Response response = null;
        if (messageForm.getFromTextField().trim().length() < 1
                || messageForm.getToTextField().trim().length() < 1
                || messageForm.getSubjectTextField().trim().length() < 1
                || messageForm.getContentTextArea().trim().length() < 1) {
            JOptionPane.showMessageDialog(messageForm,
                    "One or more fields is missing.",
                    "Missing Field(s)", JOptionPane.ERROR_MESSAGE);
        }else{
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("hh:mm ' on' MMMM dd yyyy", Locale.ENGLISH);
            String dateAsString = simpleDateFormat.format(new Date());
            MailBox mailBox = new MailBox(null, dateAsString, messageForm.getSubjectTextField(),
                    messageForm.getContentTextArea(), messageForm.getFromTextField(),
                    messageForm.getToTextField());
            List<Object> mailList = new ArrayList<Object>();
            mailList.add(mailBox);
            Request request = (new Request(RequestCriteria.SEND_LETTER, null));
            request.setObjList(mailList);
            try {
                response = ServerConnect.connect(request);
            } catch (IOException e1) {
                e1.printStackTrace();
            }
            if (response != null && response.getSuccess()==true) {

                System.out.println("Ok");

            }

        }
    }