How to enable email validation using ZeroBounce
Learn how to connect ZeroBounce to B2CORE to reject invalid, disposable, and risky email addresses when clients register in the B2CORE UI
ZeroBounce is an email validation service. Once connected, B2CORE checks each email address that a client enters during registration and rejects addresses that cannot receive mail, such as invalid, disposable, or spam trap addresses.
ZeroBounce validation works only with the new registration settings (System > Registration). Registration wizards do not use it.
Before you start, note the following:
- One ZeroBounce connection applies to all registration profiles. You cannot enable or disable the check for a specific profile.
- Only one ZeroBounce connection can exist in B2CORE.
- Each email address check costs 1 ZeroBounce credit. Before spending a credit, B2CORE checks the email domain: if the domain is misspelled or has no MX records, the email address is rejected without calling ZeroBounce. To learn how else B2CORE saves credits, see Caching and credits.
Get a ZeroBounce API key
Sign up on the ZeroBounce website, buy credits, and create an API key in your ZeroBounce account. You'll need this key to configure the connection.
Configure a connection to ZeroBounce
To configure a connection in the B2CORE Back Office:
Navigate to System > External connections.
Click +Create in the upper-right page corner.
On the Create connection page, fill in the following fields:
- In the Name field, enter a name that you want to use for the connection.
- In the Caption field, enter a caption that will be applied to the connection in the Back Office.
- In the Provider dropdown, select ZeroBounce.
Click Save to create the connection.
Find the newly created connection in the list and click Edit.
On the Edit connection page, fill in the following fields:
- In the API Key field, enter your ZeroBounce API key. When you edit the connection later, leave this field empty to keep the saved key.
- In the API Region dropdown, select the ZeroBounce API region:
- Global (
api.zerobounce.net) — the default value - USA (
api-us.zerobounce.net) - EU (
api-eu.zerobounce.net)
- Global (
Click Test connection to verify the API key. The test does not spend ZeroBounce credits. Possible results:
- Credit balance: N — the connection works, and N credits are available.
- No credits left. Sign-up emails are accepted unchecked until the balance is topped up — the key is valid, but the credit balance is 0. Top up your ZeroBounce balance.
- API key is not accepted by ZeroBounce — the key is wrong. Check the key in your ZeroBounce account.
- API key is not set — the API Key field is empty.
In the Enabled dropdown, select Yes.
Click Save to apply the changes.
Check the ZeroBounce status
To check whether ZeroBounce validation is active, navigate to System > Registration and open any registration profile. The form shows one of the following notes:
- ZeroBounce is on — the connection exists and is enabled. Email addresses are checked with ZeroBounce.
- Connection is disabled — the connection exists but is switched off. To turn on the check, set Enabled to Yes in the connection settings.
- No ZeroBounce connection — no connection exists. Only the format, black list, uniqueness, and domain checks run.
How email addresses are checked
When a client submits the registration form, B2CORE checks the email address in the following order:
- Format and form rules — the email address is well-formed and meets the field rules.
- Email black list — the email domain is not blacklisted. Otherwise, the client sees the error: Domain is blocked in the system.
- Uniqueness — no other client is registered with this email address.
- Domain check — the email domain exists and has MX records. This check catches misspelled domains, such as
gmial.com, before a ZeroBounce credit is spent. - ZeroBounce — the email address can receive mail. Otherwise, the client sees the error: This email address cannot receive mail.
ZeroBounce runs last because it is the only paid check. If an earlier check fails, ZeroBounce is not called, and no credit is spent.
All checks run before B2CORE sends the confirmation email.
Rejected and accepted email addresses
The result depends on the status that ZeroBounce returns:
| ZeroBounce status | Result |
|---|---|
invalid, spamtrap, abuse | Rejected |
do_not_mail with sub-status disposable, toxic, global_suppression, or possible_trap | Rejected |
do_not_mail with any other sub-status, such as role-based addresses (info@, support@) and aliases | Accepted |
valid, catch-all, unknown | Accepted |
When ZeroBounce is unavailable
If ZeroBounce cannot check the email address, registration continues without the check, and the email address is accepted. This happens when:
- The ZeroBounce API is unreachable or doesn't respond within 5 seconds.
- The ZeroBounce API returns an error or an unknown status.
- Your ZeroBounce account has no credits left.
B2CORE logs each such case as a warning. This way, a ZeroBounce outage never blocks client registration.
When your credit balance reaches 0, email addresses are accepted without the ZeroBounce check. Monitor your balance in your ZeroBounce account or with Test connection.
Caching and credits
To reduce credit usage, B2CORE caches the result for each email address for 7 days. If a client enters the same email address again within this period, B2CORE uses the cached result and doesn't spend a credit.
Results with the unknown status are not cached: ZeroBounce doesn't charge for them, and such results are often temporary.
Each check that is not cached costs 1 ZeroBounce credit. Along with the email address, B2CORE sends the client's IP address to ZeroBounce.
Last updated on