- Symphony 2.2.1
-
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
66 -
› Unknown
33 - Delegates83
- Deprecated30
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public abstract class EmailHelper
class.emailhelper.php #10A helper class for various email functions.
Methods
static string arrayToList(
$arr)
Implode an array to a comma-separated list
Parameters
static void base64ContentTransferEncode(
$data, $length)
Content-Transfer-Encoding for attachments
This function will encode attachments according to RFC2045. Line length must not exceed the default (76 characters).
static string fold(
$input, $max_length)
Folding an email header field body as required by RFC2822.
Parameters
Returns
folded output string
string getMimeType(
$file)
Gets mime type of a file.
For email attachments, the mime type is very important. Uses the php 5.3 function (finfo_open), if this function is not found, fallback to a fallback function. Will use application/octet-stream as a fallback when no matches were found.
Returns
MIMEtype
static string qEncode(
$input, $max_length)
Q-encoding of a header field 'text' token or 'word' entity within a 'phrase', according to RFC2047. The output is called an 'encoded-word'; it must not be longer than 75 characters.
This might be achieved with PHP's mbstring
functions, but
mbstring
is a non-default extension.
For simplicity reasons this function encodes every character except upper and lower case letters and decimal digits.
RFC: 'While there is no limit to the length of a multiple-line header field, each line of a header field that contains one or more 'encoded-word's is limited to 76 characters.' The required 'folding' will not be done here, but in another helper function.
This function must be 'multi-byte-sensitive' in a way that it must never scatter a multi-byte character representation across multiple encoded-words. So a 'lookahead' has been implemented, based on the fact that for UTF-8 encoded characters any byte except the first byte will have a leading '10' bit pattern, which means an ASCII value >=128 and <=191.
Parameters
Returns
$output encoded string
static string qpContentTransferEncode(
$input, $max_length)
Quoted-printable encoding of a message body (part), according to RFC2045.
This function handles
Parameters
Returns
$output encoded string