Installation guide
This page shows how to add Addressfinder's email verification service to a custom form.
JavaScript snippet
This is the simplest way to add email verification to your website. It only takes a few minutes.
Copy the code snippet below and update the addressSelector
and licenceKey
with your values, then add it within the <body>
tags in your webpage - ideally just before the closing </body>
tag.
<script>
(function (d) {
// ADDRESSFINDER EMAIL VERIFICATION
// https://addressfinder.com/email-verification
var conf = {
addressSelector: "input[type=email]",
licenceKey: "ADDRESSFINDER_DEMO_KEY",
check: "domain,connection"
rules: {
},
};
d.addEventListener("DOMContentLoaded",function(){if(d.querySelector(conf.addressSelector)){var e=d createElement("script");e.src="https://api.addressfinder.io/assets/email/v2/widget.js",e.async=!0,e.onload=function(){new AddressfinderEmail.Email.Widget(conf.addressSelector, conf.licenceKey, conf)},d.body.appendChild(e)}});
})(document);
</script>
Once the snippet is added, email verification will automatically start working with your form fields. You can further customise the verification service by adding rules
.
Step-by-step guide
You should have a working web form containing an email address field.
- Copy and paste the code snippet at the bottom of your webpage before the closing
</body>
tag. - Replace the value of
addressSelector
with the ID attribute of your email field (e.g.#email_address
). You can also use a CSS selector such asinput[type=email]
orinput[name=email_address]
. - Replace the value of
licenceKey
with your credentials, you can find it in the Portal. - If you prefer a faster check instead of the default full verification, change the value of
check
fromdomain,connection
todomain
. - Customise the verification service settings by including advanced rules (optional).
To get a license key, sign up for a 30-day free trial.
Already have a subscription? Find your key in the Credentials section in the Portal.