Module interzoid.emailinfo
ballerinax/interzoid.emailinfo Ballerina library
Overview
The Interzoid Email Info connector provides access to the Interzoid Email Address Validation Demographics API from Ballerina. Given an email address, the API validates it and returns domain details, organization data and geolocation information. This connector supports version 1.0.0 of the API.
Key features
- Validate email addresses and check mail server status
- Detect disposable, generic, vulgar, government and educational addresses
- Retrieve domain owner, organization, revenue and headcount data
- Look up headquarters location and currency information for a domain
Setup guide
-
Register for an Interzoid API account at Interzoid Registration.
-
Copy the API license key that Interzoid issues for your account.
-
Provide the license key when you create the connector client, for example through a
Config.tomlentry.
Quickstart
-
Import the connector.
import ballerinax/interzoid.emailinfo; -
Create a
Config.tomlfile with your license key.license = "<your-license-key>" -
Create the client.
configurable string license = ?; emailinfo:Client emailClient = check new ({license}); -
Retrieve information for an email address.
public function main() returns error? { emailinfo:EmailInfo _ = check emailClient->getEmailInfo(email = "joesmith@amazon.com"); }
Examples
The Interzoid Email Info connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
- signup_email_validation - Validate a new sign-up email address and reject disposable ones.
- lead_company_enrichment - Enrich a sales lead with the organization behind its email address.