Parsing the From field
| From: | Ron Piggott | Date: | Sat, 19 Nov 2011 16:23:59 +0000 |
| Subject: | Parsing the From field | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-315758@lists.php.net to get a copy of this message | ||
I am unsure of how to parse first name, last name and e-mail address from the 'From:'
field of an e-mail.
What I am struggling with is if the name has more than two words
- Such as the last name being multiple words
- A name a business or department is given instead of a personal name
- If the person has included their middle name, middle initial or degrees (“Dr.”)
- If last name has multiple words
Also the formatting of the from field changes in various e-mail programs:
From: Ron Piggott <ron.piggott@actsministries.org>
From: "Ron Piggott" <ron.piggott@actsministries.org>
From: ron.piggott@actsministries.org
From: <ron.piggott@actsministries.org>
If there is more than 2 words for the name I would like them to be assigned to the last name.
Ron
Ron Piggott
www.TheVerseOfTheDay.info