ATEXT
ATEXT
Valid atext characters.
Class to parse identification headers (RFC 5322 [3.6.4]): Message-ID, References, and In-Reply-To.
ENCODE_FILTER
Excluded (in ASCII decimal): 0-8, 10-31, 34, 40-41, 44, 58-60, 62, 64, 91-93, 127
since |
---|
None found |
None found |
None found |
$_listob : \Horde_Mail_Rfc822_List
List object to return in parseAddressList().
None found |
None found |
None found |
parseAddressList(mixed $address, array $params = array()) : \Horde_Mail_Rfc822_List
Starts the whole process.
mixed | $address | The address(es) to validate. Either a string, a Horde_Mail_Rfc822_Object, or an array of strings and/or Horde_Mail_Rfc822_Objects. |
array | $params | Optional parameters:
|
A list object.
None found |
encode(string $str, string $type = 'address') : string
Quotes and escapes the given string if necessary using rules contained in RFC 2822 [3.2.5].
string | $str | The string to be quoted and escaped. |
string | $type | Either 'address', 'comment' (@since 2.6.0), or 'personal'. |
The correctly quoted and escaped string.
None found |
trimAddress(string $address) : string
If an email address has no personal information, get rid of any angle brackets (<>) around it.
string | $address | The address to trim. |
The trimmed address.
None found |
approximateCount(string $data) : integer
Returns an approximate count of how many addresses are in the string.
This is APPROXIMATE as it only splits based on a comma which has no preceding backslash.
string | $data | Addresses to count. |
Approximate count.
None found |
isValidInetAddress(string $data, boolean $strict = false) : mixed
Validates whether an email is of the common internet form: <user>@<domain>. This can be sufficient for most people.
Optional stricter mode can be utilized which restricts mailbox characters allowed to: alphanumeric, full stop, hyphen, and underscore.
string | $data | Address to check. |
boolean | $strict | Strict check? |
False if it fails, an indexed array username/domain if it matches.
None found |
__construct(string $value = null)
Constructor.
string | $value | Identification field value to parse. |
None found |
parse(string $value)
Parse an identification header.
string | $value | Identification field value to parse. |
None found |
None found |
None found |
_parseGroup() : boolean
group = display-name ":" [mailbox-list / CFWS] ";" [CFWS] display-name = phrase
True if a group was parsed.
None found |
_parseMailbox() : mixed
mailbox = name-addr / addr-spec
Mailbox object if mailbox was parsed, or false.
None found |
_parseNameAddr() : mixed
name-addr = [display-name] angle-addr display-name = phrase
Mailbox object, or false.
None found |
_parseAddrSpec() : mixed
addr-spec = local-part "@" domain
Mailbox object.
None found |
_parseLocalPart() : string
local-part = dot-atom / quoted-string / obs-local-part obs-local-part = word *("." word)
The local part.
None found |
_parseAngleAddr() : mixed
"<" [ "@" route ":" ] local-part "@" domain ">"
Mailbox object, or false.
None found |
_parseDomainList() : array
obs-domain-list = "@" domain *(*(CFWS / "," ) [CFWS] "@" domain)
Routes.
None found |
_rfc822ParsePhrase( $phrase)
phrase = 1*word / obs-phrase word = atom / quoted-string obs-phrase = word *(word / "." / CFWS)
$phrase |
None found |
_rfc822ParseQuotedString( $str)
$str |
None found |
_rfc822ParseDotAtom( $str, string $validate = null)
dot-atom = [CFWS] dot-atom-text [CFWS] dot-atom-text = 1*atext *("." 1*atext)
atext = ; Any character except controls, SP, and specials.
For RFC-822 compatibility allow LWSP around '.'.
$str | ||
string | $validate | Use these characters as delimiter. |
None found |
_rfc822ParseAtomOrDot( $str)
atom = [CFWS] 1*atext [CFWS] atext = ; Any character except controls, SP, and specials.
This method doesn't just silently skip over WS.
$str |
None found |
_rfc822ParseDomain( $str)
domain = dot-atom / domain-literal / obs-domain domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] obs-domain = atom *("." atom)
$str |
None found |
_rfc822ParseDomainLiteral( $str)
domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] dcontent = dtext / quoted-pair dtext = NO-WS-CTL / ; Non white space controls %d33-90 / ; The rest of the US-ASCII %d94-126 ; characters not including "[", ; "]", or "\"
$str |
None found |
_rfc822SkipLwsp(boolean $advance = false)
boolean | $advance | Advance cursor? |
None found |
None found |
_rfc822IsAtext(string $chr, string $validate = null) : boolean
Check if data is an atom.
string | $chr | The character to check. |
string | $validate | If in non-validate mode, use these characters as the non-atom delimiters. |
True if a valid atom.
None found |
_curr(boolean $advance = false) : string
Return current character.
boolean | $advance | If true, advance the cursor. |
The current character (false if EOF reached).
None found |
_parseMessageId() : string
Message IDs are defined in RFC 5322 [3.6.4]. In short, they can only contain one '@' character. However, Outlook can produce invalid Message-IDs containing multiple '@' characters, which will fail the strict RFC checks.
Since we don't care about the structure/details of the Message-ID, just do a basic parse that considers all characters inside of angled brackets to be valid.
A full Message-ID (enclosed in angled brackets).
None found |