PHP Classes

Extract Name from Email Address: Extract person name from e-mail address header

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 430 All time: 6,318 This week: 455Up
Version License PHP version Categories
extract-name-email 1.2.23Free To Use But R...5.0Email, PHP 5, Text processing


This class can extract person name from e-mail address header.

It can parse given e-mail header line that should contain a person name and attempts to extract the person name from it.

The class uses certain heuristics to evaluate common ways people put their names in e-mail addresses to split the person names in its multiple parts.

A dictionary of common people names may be used to assure that the extracted names are part of the actual person name.

Innovation Award
PHP Programming Innovation award nominee
September 2012
Number 5
Some applications receive e-mail messages from users that do not specify their real name.

This class tries to guess the real name of a person that uses given e-mail address by parsing the address and splitting it in possible names that make part of the person real name.

Manuel Lemos
Picture of Peter Kahl
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom
Age: ???
All time rank: 41721 in United Kingdom
Week rank: 286 Up10 in United Kingdom Up
Innovation award
Innovation award
Nominee: 23x

Winner: 2x


# Name From Email String Extracts person's real name from an email (or any) string. ## Usage ```php use peterkahl\nameFromString\nameFromString; $email = 'johnbutterworth@genius.whatever'; echo nameFromString::getName($email); # John Butterworth ``` ## Dictionary This class depends on a dictionary of names. While it is good to have large dictionary of all possible strings (names), having the dictionary too large may cause erroneous results. Remember, you can never expect a precise result from this class; in most cases, the results are quite precise. For your convenience, extended version of the dictionary is provided. You may, also, create your own dictionary, especially if the one provided doesn't contain the names that are common in your geographical area.

  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Doc. Readme
Accessible without login Plain text file LICENSE Doc. License

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file dictionary-names-extended.php Aux. Auxiliary script
  Accessible without login Plain text file dictionary-names.php Aux. Auxiliary script
  Plain text file nameFromString.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,318
This week:455Up
 User Ratings  
 All time