/** * Copyright (c) 1998-2025, OmniV Global Systems, LLC. DBA LucidTrac All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use * in connection with the web services and APIs provided by OmniV Global Systems, LLC. * * As with any software that integrates with the LucidTrac platform, your use of * this software is subject to the LucidTrac Platform Policy * [https://lucidtrac.com/our/privacy_policy]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var thisDom = window.location.protocol+'//'+window.location.hostname; var dom_og = ''; if(thisDom!='https://lucidtrac.com'){ console.log('Your validation service does not seam to be active on this domain! Sorry :{ '); }else{ if(dom_og!=''){ console.log('Your LucidTrac Email Validation Service for domain has been bypassed to start on ERP domain https://lucidtrac.com.'); } console.log('Your LucidTrac Email Validation Service for domain https://lucidtrac.com has been started.'); const validation_email_field = document.getElementById('lucidtrac-erp-1681675345-bemail'); if (validation_email_field === null) {console.log('The input element lucidtrac-erp-1681675345-bemail is not visible on the page we can not continue Sorry :{ '); }else{ console.log('Your LucidTrac Email Validation Service for domain https://lucidtrac.com - a match found for lucidtrac-erp-1681675345-bemail: GOOD JOB.'); validation_email_field.addEventListener('change', ___ValidationServices); function ___ValidationServices(){ const email = validation_email_field.value.trim(); function ___ValidateEmail(email) { const re = /\S+@\S+\.\S+/; return re.test(email); } if(!___ValidateEmail(email)){ alert('That does not seem to be a valid email address.'); validation_email_field.focus(); console.log("can not send "+email+" to be verified. format invalid for an email address."); } if(___ValidateEmail(email)){ validation_email_field.disabled=true; console.log("we are about to send "+email+" to be verified."); const data = new URLSearchParams(); data.append('validate_single', 'true'); data.append('single_email', email); fetch('https://emailvalidation.lucidtrac.io//connected/q5i574y4v5o4r5i5m4m5d4z5c4f52456p4b484p4t506l4u5u484f444l4q4a434z3l5v5l4r2v2o2x244i5p4t4c5s2y426g3o5o4p4m3b4d366k3d4l3z3166454a5i3q4k3h4q2?domain_key=n516y5h4k42314u2j4z5g59444s4w594c434g5s5s5&f=lucidtrac-erp-1681675345-bemail', { method: 'POST', body: data }).then(response => response.json()) .then(data => { validation_email_field.disabled = false; if(data.result.verdict=="Valid"){ validation_email_field.style.border = '1px solid green'; } if(data.result.verdict=="Risky" ){ validation_email_field.style.border = '1px solid orange'; } if(data.result.verdict=="Invalid"){ let checks = ''; if(data.result.checks.domain.has_mx_or_a_record!=1){ checks +='There appears to be no MX or A Record for this domain. Check your spelling and try again.' } alert('The email address '+email+' appears to be invalid, possible reasons are; '+checks+'.'); validation_email_field.value=''; validation_email_field.style.border = '1px solid red'; } }).catch(error => { console.error(error); validation_email_field.disabled = false; }); } } } }