Source for file AddressStructure.class.php
Documentation is available at AddressStructure.class.php
* AddressStructure.class.php
* This file contains functions needed to extract email address headers from
* @copyright © 2003-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: AddressStructure.class.php,v 1.18 2006/10/06 21:53:04 stevetruckstuff Exp $
* Class used to work with email address headers
* @todo check use of this variable. var is not used in class.
* @todo check use of this variable. var is not used in class.
* Return address information from mime headers.
* @param boolean $full return full address (true) or only personal if it exists, otherwise email (false)
* @param boolean $encoded (since 1.4.0) return rfc2047 encoded address (true) or plain text (false).
function getAddress($full =
true, $encoded =
false) {
if (preg_match('/(=\?([^?]*)\?(Q|B)\?([^?]*)\?=)(.*)/Ui',$personal,$reg)) {
if ($encoded &&
!$is_encoded) {
if ($personal !==
$personal_encoded) {
$personal =
$personal_encoded;
$addr =
($email ?
$personal .
' <' .
$email.
'>'
$result =
($full ?
$addr :
$best_dpl);
* Shorter version of getAddress() function
* Returns full encoded address.
* Return just the email portion of this address
Documentation generated on Sat, 07 Oct 2006 16:08:50 +0300 by phpDocumentor 1.3.0RC6