IMPORTANT: You can use this as an alternative for Debounce, as Debounce is currently not accepting new users right now.

Emailable is an alternate solution for real-time email verification. You may sign up for an account with with them by going to their website:

STEP 1: Create Q&A Email field

STEP 2: Click the Add Scripts button

STEP 3: Enter the name of the script, select Script as the type and set it as an Enter event

  • You can name the script anything you want.

STEP 4: Paste this code

<script>
  let api_key = 'YOUR_API_KEY_HERE';

  let emailField, submitBtn, buttonTxt, typingWaitTimer, previousValue, restoreTxt;

  const keyPressHandler = () => {
    clearTimeout(restoreTxt);
    submitBtn.disabled = true;
    submitBtn.innerHTML = '<i class="fa fa-spin fa-spinner"></i> Verifying email...';
    let value = emailField.value;
    if (value != '' && value != previousValue) {
      clearTimeout(typingWaitTimer);
      typingWaitTimer = setTimeout(() => {
        !submitBtn.classList.contains('hidden') && checkEmail();
      }, 700);
    }
    previousValue = value;
  };

  const checkEmail = () => {
    const requestOptions = {
      method: 'GET',
    };
    
    fetch(`https://api.emailable.com/v1/verify?email=${emailField.value}&api_key=${api_key}`, requestOptions)
      .then((response) => response.json())
      .then((result) => {
        DT.setField('emailable_status', result.state);
        if (result.state === 'deliverable') {
          submitBtn.disabled = false;
          setTimeout(() => {
            submitBtn.innerHTML = '<i class="fa fa-check-circle"></i> Email Verified';
          }, 5);
          restoreTxt = setTimeout(() => {
            submitBtn.innerHTML = '<i class="fa fa-check-circle"></i> ' + buttonTxt;
          }, 2000);
        } else {
          setTimeout(() => {
            submitBtn.innerHTML = '<i class="fa fa-exclamation-circle"></i> Invalid Email';
          }, 5);
          submitBtn.disabled = true;
        }
      })
      .catch((error) => console.log('error', error));
  };

  setTimeout(() => {
    submitBtn = document.getElementsByClassName('submit-btn')[0] ? document.getElementsByClassName('submit-btn')[0] : document.getElementsByClassName('next-btn')[0];
    buttonTxt = submitBtn.innerHTML;
    submitBtn.classList.add('hidden');
    emailField = document.querySelector('input[type=email]');
    emailField.addEventListener('keyup', keyPressHandler);
  }, 100);
</script>

STEP 5: Replace “YOUR_API_KEY_HERE” with your own actual API Key from Emailable

STEP 6: Save and Publish.

  • This completes your setup of Emailable email verification.

Leave a Reply

Your email address will not be published. Required fields are marked *