/** * Register a new user * * @return : Return false if registration was unsuccesful */ public static boolean registerUser() { // Insert into table, then create a new user with that data // Using the users email String userEmail = "*****@*****.**"; Mail mailSender = new Mail(); mailSender.setTo(new String[] {userEmail}); mailSender.setBody("Welcome User! Thanks for Registering with HandsOn Android!"); mailSender.sendMail(); return false; }
/** * Sign up for event * * @param e : The event to sign up for * @return : Return false if registration was unsuccessful */ public static boolean signUpForEvent(Events e) { // Event signup goes here! String title = "Default"; String description = "Default"; String location = "Default"; Date date = new Date(1994, 05, 27); int beginTime = 000; int endTime = 000; String firstName = "Default"; String eventCoordinatorEmail = "*****@*****.**"; String userEmail = "*****@*****.**"; Mail mailSender = new Mail(); mailSender.setTo(new String[] {userEmail}); mailSender.setBody( "Welcome User! Thanks for Registering for the event " + title + "! The date is " + date.toString() + " from " + beginTime + " to " + endTime); mailSender.sendMail(); mailSender = new Mail(); mailSender.setTo(new String[] {eventCoordinatorEmail}); mailSender.setBody( "The user " + firstName + " has signed up for the event " + title + "!" + " Their Email is " + userEmail); mailSender.sendMail(); // Unimplemented WebMethods.addEventToCalendar(title, description, location, date, beginTime, endTime); return false; }