Email Verification

E-Mail Verification and Domain Validation via API. Checks an email address against blacklist and availability of mailhost. Blacklisted domains and email addresses are simply stored in a text file. Easy to edit.

Functional API for E-Mail and Domain Verification.

  • Email address verification against domain black- and whitelist (automated updates via online service trashmail-blacklist.org)
  • Determination of availability of a mailhost. (MX and A Resource Record)
  • Validation of Top Level Domains. (list of TLDs (punycode encoded) pulled from IANA stored in local textfile, automated monthly update)
  • Syntax validation of domainnames
  • Syntax validation of hostnames (punycode encoded)

Domains are listed in easy to edit text files blacklist.txt and whitelist.txt which are stored in the repository of this module.

API Usage


// get module  
$mailcheck = $modules->get('EmailVerification');

// return bool/ string - automatted update of blacklist file
$mailcheck->blacklisted(email|domain)

// return bool - validate a top level domain, checks against IANA list
$mailcheck->validTLD(tld)

// return array of punycoded TLDs - cyclic updated, data pulled from IANA
$mailcheck->getTLDs(cycle=2592000)

// return string - domain part of an email address
$mailcheck->getDomain($str)

// return bool - checks syntax converts to punycode
$mailcheck->validDomainName(domain);

// return bool - checks punycode encoded syntax
$mailcheck->validHostName(host);

// return bool - checks syntax and accessibility
$mailcheck->validHost(email|domain)

// add a single value to blacklist, remove from whitelist
// return false or string (domain)
$mailcheck->blacklist(email|domain)

// add a single value to whitelist, remove from blacklist
// return false or string (domain)
$mailcheck->whitelist(email|domain)

License


GNU-GPLv3

Author


kixe (Christoph Thelen)

More modules by kixe

  • Color

    Field that stores colors. Many options for Input (HTML5 Inputfield Color, Textfield with changing background, various jQuery/JS ColorPickers, custom jQuery/JS/CSS) and Output (RGB, RGBA, HSL, HSLA…
  • Cronjob Database Backup

    Periodic automatic backup of the database. Set interval in settings.
  • Fieldtype Select External Option

    Fieldtype which generates the options for a Select Inputfield from any table of any (accessible) database. Define the source table, columns (to pull value & label) and the preferred…
  • 404 Logger

    Logs all requests resulting in http error 404
  • Setup Page Name

    Overwrites function setupPageName() in class Pages (core), which is typically called in case of autogeneration of pages. Provides more options for 'Name Format Children' in parent template…
  • Page Reference Context Data

    Field that stores one or more references to ProcessWire pages with additional data in field context, editable via page edit modal of the referenced page.
  • Cronjob Empty Trash

    Auto delete trashed pages sustainably after a predifined period of time set in module settings. This cronjob will run once per day.
  • Textformatter Page Images

    Allows you to insert images in a text area by referencing them with tags in the following format [[fieldName,Number,class]]. All Parameters are optional. Configurable base class and wrapper.
  • Button Fieldtype

    Field that stores 3 values for label, target and class (CSS). Output markup configurable in field settings.

All modules by kixe

Install and use modules at your own risk. Always have a site and database backup before installing new modules.