EC-CUBE
Public メソッド | 変数
クラス Mail_mimePart

Public メソッド

 Mail_mimePart ($body= '', $params=array())
 encode ($boundary=null)
 encodeToFile ($filename, $boundary=null, $skip_head=false)
 _encodePartToFile ($fh, $boundary=null, $skip_head=false)
addSubpart ($body, $params)
 _getEncodedData ($data, $encoding)
 _getEncodedDataFromFile ($filename, $encoding, $fh=null)
 _quotedPrintableEncode ($input, $line_max=76)
 _buildHeaderParam ($name, $value, $charset=null, $language=null, $encoding=null, $maxLength=75)
 _buildRFC2047Param ($name, $value, $charset, $encoding='quoted-printable', $maxLength=76)
 encodeHeader ($name, $value, $charset='ISO-8859-1', $encoding='quoted-printable', $eol="\r\n")
 _explodeQuotedString ($delimiter, $string)
 encodeHeaderValue ($value, $charset, $encoding, $prefix_len=0, $eol="\r\n")
 encodeQP ($str)
 encodeMB ($str, $charset, $encoding, $prefix_len=0, $eol="\r\n")
 _qpReplaceCallback ($matches)
 _encodeReplaceCallback ($matches)

変数

 $_encoding
 $_subparts
 $_encoded
 $_headers
 $_body
 $_body_file
 $_eol = "\r\n"

関数

_buildHeaderParam ( name,
value,
charset = null,
language = null,
encoding = null,
maxLength = 75 
)

Encodes the paramater of a header.

引数:
string$nameThe name of the header-parameter
string$valueThe value of the paramter
string$charsetThe characterset of $value
string$languageThe language used in $value
string$encodingParameter encoding. If not set, parameter value is encoded according to RFC2231
int$maxLengthThe maximum length of a line. Defauls to 75
戻り値:
string

private

_buildRFC2047Param ( name,
value,
charset,
encoding = 'quoted-printable',
maxLength = 76 
)

Encodes header parameter as per RFC2047 if needed

引数:
string$nameThe parameter name
string$valueThe parameter value
string$charsetThe parameter charset
string$encodingEncoding type (quoted-printable or base64)
int$maxLengthEncoded parameter max length. Default: 76
戻り値:
string Parameter line private
_encodePartToFile ( fh,
boundary = null,
skip_head = false 
)

Encodes given email part into file

引数:
string$fhOutput file handle
string$boundaryPre-defined boundary string
boolean$skip_headTrue if you don't want to save headers
戻り値:
array True on sucess or PEAR error object private
_encodeReplaceCallback ( matches)

Callback function to replace extended characters (-xFF) with their ASCII values (RFC2231)

引数:
array$matchesPreg_replace's matches array
戻り値:
string Encoded character string private
_explodeQuotedString ( delimiter,
string 
)

Explode quoted string

引数:
string$delimiterDelimiter expression string for preg_match()
string$stringInput string
戻り値:
array String tokens array private
_getEncodedData ( data,
encoding 
)

Returns encoded data based upon encoding passed to it

引数:
string$dataThe data to encode.
string$encodingThe encoding type to use, 7bit, base64, or quoted-printable.
戻り値:
string private
_getEncodedDataFromFile ( filename,
encoding,
fh = null 
)

Returns encoded data based upon encoding passed to it

引数:
string$filenameData file location
string$encodingThe encoding type to use, 7bit, base64, or quoted-printable.
resource$fhOutput file handle. If set, data will be stored into it instead of returning it
戻り値:
string Encoded data or PEAR error object private
_qpReplaceCallback ( matches)

Callback function to replace extended characters (-xFF) with their ASCII values (RFC2047: quoted-printable)

引数:
array$matchesPreg_replace's matches array
戻り値:
string Encoded character string private
_quotedPrintableEncode ( input,
line_max = 76 
)

Encodes data to quoted-printable standard.

引数:
string$inputThe data to encode
int$line_maxOptional max line length. Should not be more than 76 chars
戻り値:
string Encoded data

private

& addSubpart ( body,
params 
)

Adds a subpart to current mime part and returns a reference to it

引数:
string$bodyThe body of the subpart, if any.
array$paramsThe parameters for the subpart, same as the $params argument for constructor.
戻り値:
Mail_mimePart A reference to the part you just added. It is crucial if using multipart/* in your subparts that you use =& in your script when calling this function, otherwise you will not be able to add further subparts. public
encode ( boundary = null)

Encodes and returns the email. Also stores it in the encoded member variable

引数:
string$boundaryPre-defined boundary string
戻り値:
An associative array containing two elements, body and headers. The headers element is itself an indexed array. On error returns PEAR error object. public
encodeHeader ( name,
value,
charset = 'ISO-8859-1',
encoding = 'quoted-printable',
eol = "\r\n" 
)

Encodes a header as per RFC2047

引数:
string$nameThe header name
string$valueThe header data to encode
string$charsetCharacter set name
string$encodingEncoding name (base64 or quoted-printable)
string$eolEnd-of-line sequence. Default: "\r\n"
戻り値:
string Encoded header data (without a name) public
から:
1.6.1
encodeHeaderValue ( value,
charset,
encoding,
prefix_len = 0,
eol = "\r\n" 
)

Encodes a header value as per RFC2047

引数:
string$valueThe header data to encode
string$charsetCharacter set name
string$encodingEncoding name (base64 or quoted-printable)
int$prefix_lenPrefix length. Default: 0
string$eolEnd-of-line sequence. Default: "\r\n"
戻り値:
string Encoded header data public
から:
1.6.1
encodeMB ( str,
charset,
encoding,
prefix_len = 0,
eol = "\r\n" 
)

Encodes the given string using base64 or quoted-printable. This method makes sure that encoded-word represents an integral number of characters as per RFC2047.

引数:
string$strString to encode
string$charsetCharacter set name
string$encodingEncoding name (base64 or quoted-printable)
int$prefix_lenPrefix length. Default: 0
string$eolEnd-of-line sequence. Default: "\r\n"
戻り値:
string Encoded string public
から:
1.8.0
encodeQP ( str)

Encodes the given string using quoted-printable

引数:
string$strString to encode
戻り値:
string Encoded string public
から:
1.6.0
encodeToFile ( filename,
boundary = null,
skip_head = false 
)

Encodes and saves the email into file. File must exist. Data will be appended to the file.

引数:
string$filenameOutput file location
string$boundaryPre-defined boundary string
boolean$skip_headTrue if you don't want to save headers
戻り値:
array An associative array containing message headers or PEAR error object public
から:
1.6.0
Mail_mimePart ( body = '',
params = array() 
)

Constructor.

Sets up the object.

引数:
string$bodyThe body of the mime part if any.
array$paramsAn associative array of optional parameters: content_type - The content type for this part eg multipart/mixed encoding - The encoding to use, 7bit, 8bit, base64, or quoted-printable charset - Content character set cid - Content ID to apply disposition - Content disposition, inline or attachment dfilename - Filename parameter for content disposition description - Content description name_encoding - Encoding of the attachment name (Content-Type) By default filenames are encoded using RFC2231 Here you can set RFC2047 encoding (quoted-printable or base64) instead filename_encoding - Encoding of the attachment filename (Content-Disposition) See 'name_encoding' headers_charset - Charset of the headers e.g. filename, description. If not set, 'charset' will be used eol - End of line sequence. Default: "\r\n" body_file - Location of file with part's body (instead of $body)

public


このクラスの説明は次のファイルから生成されました:
 全て データ構造 ネームスペース 関数 変数