@Override
    public String execute() throws Exception {

        try {

            Random rand = new Random();

            setConfcode(rand.nextInt());


            if (pwd.equals(getConfirmpwd())) {
                TempUser tuser = new TempUser(getConfcode(), email, pwd, userEnum.NotRegistered.getUserType(), uname);
                myDao.getDbsession().save(tuser);
//            Map session =ActionContext.getContext().getSession();
//            session.put("User",email);
                subject = " Welcome to Adzappy";
                setContent("Hi\t" + uname + "\nWelcome to Adzappy :\n"
                        + "                                               "
                        + "Your Registered login  mail id is:" + email + "\n   "
                        + "                         "
                        + "   Please click th following link to activate your account\n  "
                        + "                                       "
                        + "http://beta.mathi.cloudbees.net/activationAccount.action?email=" + email + "&confcode=" + getConfcode()
                        + "\n           "
                        + " \nThanks & Regards  \n   "
                        + " Adzappy Team\n");
                if (email == null) {
                    addActionError("Please Enter Email Address");
                } else {

                    sendMail.test(email, subject, content);
                }
                addActionMessage("Hi thanks for registering with us . Please check your email for completing the activation process.");
                return "success";
            } else {
                return "error";
            }
        } catch (HibernateException e) {
            addActionError("Server  Error Please Recheck All Fields ");
            e.printStackTrace();
            return "error";
        } catch (NullPointerException ne) {

            addActionError("Server  Error Please Recheck All Fields ");
            ne.printStackTrace();
            return "error";
        } catch (Exception e) {

            addActionError("Server  Error Please Recheck All Fields ");
            e.printStackTrace();
            return "error";
        }


    }