PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-11-18 (9 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 281 This week: 2All time: 6,923 This week: 567Up
Version License PHP version Categories  
extract-name-email 1.2.2Free To Use But R...5.0Email, PHP 5, Text processing
Description Author  

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
Name: Peter Kahl <contact>
Classes: 5 packages by
Country: Hong Kong Hong Kong
Age: ???
All time rank: 11705 in Hong Kong Hong Kong
Week rank: 160 Up1 in Hong Kong Hong Kong Up
Innovation award
Innovation award
Nominee: 2x

Details provided by the author  
About
=====

This PHP class extracts real name and email address from email address header.

It is optimised to process both single and multiple email address headers.

This class was nominated for INNOVATION AWARD (September 2012) at
[phpclasses.org](http://www.phpclasses.org/package/7686-PHP-Extract-person-name-from-e-mail-address-header.html).

License
=======

Copyright 2012-2014 Peter Kahl (www.colossalmind.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Change Log
==========

1.2.2 ..... 2014-11-19
    Changed license to Apache License, Version 2.0.

1.2.1 ..... 2014-02-06
    Clean up for strict PHP standards.

1.2.0 ..... 2013-11-05
  Added method to extract email address. Bug fix.

1.1.2 ..... 2013-10-29
  Added stripping of quotation marks from addresses such as
  "jarrodmilne&#64;company.tld" &lt;jarrodmilne&#64;company.tld&gt;.
  Added some names to name dictionary.

1.1.1 ..... 2013-10-21
  Added ability to extract from addresses such as
  "user name&#64;domain.tld &lt;user&#64;domain.tld&gt;".

1.1.0 ..... 2013-10-21
  Added ability to decode encoded header string such as
  "=?iso-2022-jp?B?GyRCS1EbKEIgGyRCSH5JMRsoQiA=?= &lt;blah&#64;foo.co.jp&gt;".
  to "name_extractor".

1.0.2 ..... 2012-11-29
  Fixed typo where _ should have been - (hyphen) on line 58.

1.0.1 ..... 2012-11-02
  Added link to repo on GitHub.
  Renamed the class from "colossal_mind_extract_name_from_email_address"

1.0.0 ..... 2012-05-29
  Initial release

  Files folder image Files  
File Role Description
Plain text file class.name-extractor.php Class The main class
Accessible without login Plain text file dictionary-names.php Aux. Dictionary of common names
Accessible without login Plain text file example-1.php Example Process single address
Accessible without login Plain text file example-2.php Example Process multiple addresses
Accessible without login Plain text file README.md Doc. Readme

 Version Control Unique User Downloads Download Rankings  
 0%Total:281All time:6,923
 This week:2This week:567Up