Integrations · Mail servers and panels

Check client email addresses in WHMCS

A WHMCS addon module for hosting providers. It checks the email address a client types when signing up, when a new client checks out and when a signed-in client changes it, before WHMCS saves it. By default it only writes each result to WHMCS's Activity Log; in refuse mode the form asks for another address when the one typed cannot receive mail. Whatever happens to our API, the form goes through as usual.

Download the module, email-validation-org-whmcs-1.0.0.zip (version 1.0.0). LICENSE (MIT) is in its folder. It has not been installed on a real WHMCS yet: it was built from WHMCS's developer documentation and tested against stand-ins, so try it on a test installation first.

What you need

  • WHMCS 9.1 (PHP 8.2 to 8.4) or WHMCS 8.13 (PHP 8.1 to 8.3), with PHP's curl extension, which WHMCS needs anyway.
  • An API key from the API keys page with the permissions Validate addresses and Read balance and usage (for the key test), made for this WHMCS, with a daily credit cap.

Set it up

  1. Unzip the download into your WHMCS folder. It adds one folder, modules/addons/email_validation_org/.
  2. In the admin area: Configuration → System Settings → Addon Modules, find email-validation.org and choose Activate. Activating changes no form: there is no key yet.
  3. Choose Configure, paste the key, choose the API host (global, or EU data residency), give your admin role access to the module, and Save Changes. The mode stays Log only.
  4. Open Addons → email-validation.org and choose Test the key: it asks for your balance, which is free and needs Read balance and usage, and says whether the key works.

Then sign up on your client area with no_mailbox@sandbox.email-validation.org: in log only, the sign-up goes through and the Activity Log shows status=invalid reason=no_mailbox … action=would_refuse. Choose Refuse under Configure and try again: the form shows the message and asks for another address. Test addresses cost nothing and contact no mail server; delete the test client afterwards.

What gets checked

FormWhenSetting
Sign-upthe client area registration formCheck sign-up (on)
Checkouta new client completing an order; an existing client neverCheck checkout (on)
Profilea signed-in client changing the address; an unchanged address is not checked againCheck profile changes (on)
Staff entriesa client added or edited in the admin areaCheck staff entries (off)

Each address is checked once per page load, and a refused one gets the message once, even when WHMCS runs both of the module's hooks for one form. On the cart, a new client's details count as the checkout.

Modes

StatusLog only (default)Refuse
validloggednever refused
invalidlogged as "would refuse"refused with "Refuse invalid" (on)
disposablelogged as "would refuse"refused with "Refuse disposable" (on)
catch_allloggedrefused only with "Refuse catch-all" (off)
unknownloggednever refused

A refused address gets one message, whatever its status, so the form cannot be used to learn which status an address has. Change the text under Message. Statuses and reasons explains each value.

A failing check never stops a form

The module waits at most 7 seconds for an answer. No key, no answer in time, an API error, a redirect or an answer it does not know lets the address through, and the Activity Log says why (status=unchecked reason=timeout, for example). Each check is sent once and never retried while the client waits.

What it costs

Each check costs at most 1 credit, as with any validation request; unknown results, errors and test addresses are free. The key's daily credit cap bounds what a burst of sign-ups can spend; WHMCS's own captcha on the registration and checkout forms keeps bots from filling them.

Privacy

For each check the module sends only the address, in the body of an HTTPS request to the API host you chose, never in a URL and to no other host. Its Activity Log lines name the form, the status, the reason, the address's domain and a 12-digit reference made from a hash of the address, never the address or the key. The key stays in WHMCS's module settings and is never shown on the module's page. Checking your clients' addresses is processing of personal data on your behalf: see our DPA.

Remove it

Configuration → System Settings → Addon Modules → email-validation.org → Deactivate: the checks stop at once. The module made no tables of its own. Then delete modules/addons/email_validation_org/ and revoke the key on the API keys page.

Licence

The module is under the MIT licence (LICENSE in its folder): you may use, change and share it.

More on WHMCS

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us