diff --git a/.twilio-functions b/.twilio-functions
new file mode 100644
index 0000000..4b2aca0
--- /dev/null
+++ b/.twilio-functions
@@ -0,0 +1,10 @@
+{
+ "projects": {
+ "ACac33d4682e7b1a5e1f246746a7e6a8a5": {
+ "serviceSid": "ZS510b475a2c894d81d59e1b390ed37e02",
+ "latestBuild": "ZB70957d77fb020c2615d45dfec22e9e54"
+ }
+ },
+ "serviceSid": "ZS510b475a2c894d81d59e1b390ed37e02",
+ "latestBuild": "ZB70957d77fb020c2615d45dfec22e9e54"
+}
\ No newline at end of file
diff --git a/assets/index.html b/assets/index.html
index c581276..e591d40 100644
--- a/assets/index.html
+++ b/assets/index.html
@@ -88,6 +88,7 @@
Email
+
@@ -135,7 +136,8 @@ Last Response
if (channel == 'email'){
to = $('#email').val();
- }else{
+ }
+ else{
to = $('#phonenumber').val();
}
@@ -193,10 +195,36 @@ Last Response
$("#result_confirmCode").text(response.status);
});
}
+
+ function sendValidation() {
+ $("#result_sendCode").text('sending email validation');
+
+ var to = '';
+
+ to = $('#email').val();
+
+ var settings = {
+ "url": "/validate_email",
+ "method": "POST",
+ "timeout": 0,
+ "headers": {
+ "Content-Type": "application/x-www-form-urlencoded"
+ },
+ "data": {
+ "email": to
+ }
+ };
+
+ $.ajax(settings).done(function (response) {
+ console.log(response);
+ $("#log_result").val(JSON.stringify(response, null, 2));
+ $("#result_sendCode").text('email validated');
+ });
+ }