Encode the given string with the given encoding.
static string
encode
(string $str, string $encoding, [string $EOL = self::LINEEND])
Encode a given string in base64 encoding and break lines according to the maximum linelength.
static string
encodeBase64
(string $str, [int $lineLength = self::LINELENGTH], [int $lineEnd = self::LINEEND])
-
string
$str
-
int
$lineLength: Defaults to LINELENGTH
-
int
$lineEnd: Defaults to LINEEND
Encode a given string in mail header compatible base64 encoding.
static string
encodeBase64Header
(string $str, string $charset, [int $lineLength = self::LINELENGTH], [int $lineEnd = self::LINEEND])
-
string
$str
-
string
$charset
-
int
$lineLength: Defaults to LINELENGTH
-
int
$lineEnd: Defaults to LINEEND
Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.
static string
encodeQuotedPrintable
(string $str, [int $lineLength = self::LINELENGTH], [int $lineEnd = self::LINEEND])
-
string
$str
-
int
$lineLength: Defaults to LINELENGTH
-
int
$lineEnd: Defaults to LINEEND
Encode a given string with the QUOTED_PRINTABLE mechanism for Mail Headers.
Mail headers depend on an extended quoted printable algorithm otherwise a range of bugs can occur.
static string
encodeQuotedPrintableHeader
(string $str, string $charset, [int $lineLength = self::LINELENGTH], [int $lineEnd = self::LINEEND])
-
string
$str
-
string
$charset
-
int
$lineLength: Defaults to LINELENGTH
-
int
$lineEnd: Defaults to LINEEND
Check if the given string is "printable"
Checks that a string contains no unprintable characters. If this returns false, encode the string for secure delivery.
static boolean
isPrintable
(string $str)
Constructor
void
__construct
([null|string $boundary = null])
Return a MIME boundary
string
boundary
()
Return a MIME boundary line
string
boundaryLine
([mixed $EOL = self::LINEEND])
Return MIME ending
string
mimeEnd
([ $EOL = self::LINEEND])