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
string EOL "\r\n"

line 46

int LINE_LENGTH 76

line 47


Method Details

line 221

addPart

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

Adds or creates new multipart.

Input
NMailMimePart $part
Output
NMailMimePart  

line 120

clearHeader

public NMailMimePart clearHeader (string $name)

Removes a header.

Input
string $name
Output
NMailMimePart provides a fluent interface

line 371

encodeQuotedPrintable

public static string encodeQuotedPrintable (string $s)

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

Input
string $s
Output
string  

line 260

generateMessage

public string generateMessage ()

Returns encoded message.

Output
string  

line 245

getBody

public mixed getBody ()

Gets textual body.

Output
mixed  

line 134

getEncodedHeader

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

Returns an encoded header.

Input
string $name
string $charset
Output
string  

line 209

getEncoding

public string getEncoding ()

Returns Content-Transfer-Encoding header.

Output
string  

line 108

getHeader

public mixed getHeader (string $name)

Returns a header.

Input
string $name
Output
mixed  

line 171

getHeaders

public array getHeaders ()

Returns all headers.

Output
array  

line 233

setBody

public NMailMimePart setBody (mixed $body)

Sets textual body.

Input
mixed $body
Output
NMailMimePart provides a fluent interface

line 184

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 197

setEncoding

public NMailMimePart setEncoding (string $encoding)

Sets Content-Transfer-Encoding header.

Input
string $encoding
Output
NMailMimePart provides a fluent interface

line 67

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