Class NMailMimePart (namespace NMail)


MIME message part.

NObject
   |
   --NMailMimePart

Direct Known Sub-classes:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Mail/MailMimePart.php (line 37)
Public Method Summary
NMailMimePart
addPart ([NMailMimePart $part = NULL])
Adds or creates new multipart.
NMailMimePart
clearHeader (string $name)
Removes a header.
static string
encodeQuotedPrintable (string $s)
Converts a 8 bit string to a quoted-printable string.
string
Returns encoded message.
mixed
getBody ()
Gets textual body.
string
getEncodedHeader (string $name, [string $charset = 'UTF-8'])
Returns an encoded header.
string
Returns Content-Transfer-Encoding header.
mixed
getHeader (string $name)
Returns a header.
array
Returns all headers.
NMailMimePart
setBody (mixed $body)
Sets textual body.
NMailMimePart
setContentType (string $contentType, [string $charset = NULL])
Sets Content-Type header.
NMailMimePart
setEncoding (string $encoding)
Sets Content-Transfer-Encoding header.
NMailMimePart
setHeader (string $name, string|array $value, [bool $append = FALSE])
Sets a header.
Methods Inherited From NObject
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Constant Summary
string ENCODING_7BIT '7bit'

line 41

encoding
string ENCODING_8BIT '8bit'

line 42

encoding
string ENCODING_BASE64 'base64'

line 40

encoding
string ENCODING_QUOTED_PRINTABLE 'quoted-printable'

line 43

encoding

Method Details

line 223

addPart

public NMailMimePart addPart ([NMailMimePart $part = NULL])

Adds or creates new multipart.

Input
NMailMimePart $part
Output
NMailMimePart  

line 122

clearHeader

public NMailMimePart clearHeader (string $name)

Removes a header.

Input
string $name
Output
NMailMimePart provides a fluent interface

line 373

encodeQuotedPrintable

public static string encodeQuotedPrintable (string $s)

Converts a 8 bit string to a quoted-printable string.

Input
string $s
Output
string  

line 262

generateMessage

public string generateMessage ()

Returns encoded message.

Output
string  

line 247

getBody

public mixed getBody ()

Gets textual body.

Output
mixed  

line 136

getEncodedHeader

public string getEncodedHeader (string $name, [string $charset = 'UTF-8'])

Returns an encoded header.

Input
string $name
string $charset
Output
string  

line 211

getEncoding

public string getEncoding ()

Returns Content-Transfer-Encoding header.

Output
string  

line 110

getHeader

public mixed getHeader (string $name)

Returns a header.

Input
string $name
Output
mixed  

line 173

getHeaders

public array getHeaders ()

Returns all headers.

Output
array  

line 235

setBody

public NMailMimePart setBody (mixed $body)

Sets textual body.

Input
mixed $body
Output
NMailMimePart provides a fluent interface

line 186

setContentType

public NMailMimePart setContentType (string $contentType, [string $charset = NULL])

Sets Content-Type header.

Input
string $contentType
string $charset
Output
NMailMimePart provides a fluent interface

line 199

setEncoding

public NMailMimePart setEncoding (string $encoding)

Sets Content-Transfer-Encoding header.

Input
string $encoding
Output
NMailMimePart provides a fluent interface

line 69

setHeader

public NMailMimePart setHeader (string $name, string|array $value, [bool $append = FALSE])

Sets a header.

Input
string $name
string|array $value value or pair email => name
bool $append
Output
NMailMimePart provides a fluent interface