Rev 20530 | Rev 20535 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.hotspotstore.controllers;import java.io.IOException;import com.hotspotstore.services.SendGridMail;import com.hotspotstore.services.VerifyRecaptcha;public class ContactUsController extends BaseController{/****/private static final long serialVersionUID = 1L;private String result;private String name;public String getName() {return name;}public void setName(String name) {this.name = name;}public String getEmail() {return email;}public void setEmail(String email) {this.email = email;}public String getCity() {return city;}public void setCity(String city) {this.city = city;}public String getState() {return state;}public void setState(String state) {this.state = state;}public String getMobile() {return mobile;}public void setMobile(String mobile) {this.mobile = mobile;}public String getCategory() {return category;}public void setCategory(String category) {this.category = category;}public String getMsg() {return msg;}public void setMsg(String msg) {this.msg = msg;}private String email;private String city;private String state;private String mobile;private String category;private String msg;public String getResult() {return result;}public void setResult(String result) {this.result = result;}public String index(){return "index";}public String create(){try {String gRecaptchaResponse = request.getParameter("g-recaptcha-response");boolean verify = VerifyRecaptcha.verify(gRecaptchaResponse);SendGridMail.sendMail();if (verify){return "contact-us-success";}return "contact-us-failure";} catch (IOException e) {// TODO Auto-generated catch blockreturn "contact-us-failure";}}}