Encodes strings in a variety of formats and detects some encoding formats
Located in /Swift/Message/Encoder.php (line 20)
CHEAP_ADDRESS_RE = '(?#Start of dot-atom
)[-!#\$%&\'\*\+\/=\?\^_`{}\|~0-9A-Za-z]+(?:\.[-!#\$%&\'\*\+\/=\?\^_`{}\|~0-9A-Za-z]+)*(?#
End of dot-atom)(?:@(?#Start of domain)[-0-9A-Za-z]+(?:\.[-0-9A-Za-z]+)*(?#End of domain))?'
A singleton of this class
Retreive an instance of the encoder as a singleton.
New instances are never ever needed since it's monostatic.
Break a string apart at every occurence of <add@ress> and return an array This method does NOT remove any characters like a preg_split() would do.
Elements matching an address start with "a" followed by the numeric index
Return the base64 encoded version of the string
Return the base64 encoded version of a file
QP encoding callback method.
Internal only.
Encode a string as 7bit ascii
Return a 7bit string from a file
Strip out any characters which are not in the ASCII 7bit printable range
Return the 8bit encoded form of a string (unchanged there-abouts)
Return a 8bit string from a file
Fixes line endings to be whatever is specified by the user
SMTP requires the CRLF be used, but using sendmail in -t mode uses LF This method also escapes dots on a start of line to avoid injection
Keeps lines longer than 76 characters trimmed down to size
This currently does not convert other string encodings into 7bit
If the characters fall exclusively in the 7bit ascii range, return true
This function checks for 7bit *printable* characters
which excludes \r \n \t etc and so, is safe for use in mail headers Actual permitted chars [\ !"#\$%&'\(\)\*\+,-\.\/0123456789:;<=>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_`abcdefghijklmnopqrstuvwxyz{\|}~] Ranges \x00-\x1F are printer control sequences \x7F is the ascii delete character
Detect if a string contains multi-byte non-ascii chars that fall in the UTF-8 ranges
Return the quoted printable version of the input string
Return a file as a quoted printable encoded string
Return the base64 encoded version of a string with no breaks
Return the QP encoded version of a string with no breaks
Encode a string for RFC 2047 compatability (url-encode)
CHEAP_ADDRESS_RE
= '(?#Start of dot-atomA regular expression which matches valid e-mail addresses (including some unlikely ones)
Documentation generated on Tue, 06 Mar 2007 23:32:24 +0000 by phpDocumentor 1.3.1