protected function _formatAddress($email, $name)
    {
        if ($name === '' || $name === null || $name === $email) {
            return $email;
        } else {
            $encodedName = $this->_encodeHeader($name);
            if ($encodedName === $name  &&  strcspn($name, '()<>[]:;@\\,') != strlen($name)) {
                $format = '"%s" <%s>';
            } else {
                $format = '%s <%s>';
            }
            return sprintf($format, $encodedName, $email);
        }
    }
protected function _formatAddress($email, $name)
    {
        if ($name === '' || $name === null || $name === $email) {
            return $email;
        } else {
            $encodedName = $this->_encodeHeader($name);
            if ($encodedName === $name  &&  strcspn($name, '()<>[]:;@\\,') != strlen($name)) {
                $format = '"%s" <%s>';
            } else {
                $format = '%s <%s>';
            }
            return sprintf($format, $encodedName, $email);
        }
    }
protected function _formatAddress ( $ email , $ name ) { if ( $ name === '' || $ name === null || $ name === $ email ) { return $ email ; } else { $ encodedName = $ this -> _encodeHeader ( $ name ) ; if ( $ encodedName === $ name && strcspn ( $ name , '()<>[]:;@\\,' ) != strlen ( $ name ) ) { $ format = '"%s" <%s>' ; } else { $ format = '%s <%s>' ; } return sprintf ( $ format , $ encodedName , $ email ) ; } }
Formats e-mail address

@param string $email
@param string $name
@return string
Formats e - mail address