Constants

BASE64

BASE64 = 'BASE64' : string

Encoding constants

QUOTED_PRINTABLE

QUOTED_PRINTABLE = 'QUOTED_PRINTABLE'

BINARY

BINARY = 'BINARY'

_8BIT

_8BIT = '_8BIT'

_7BIT

_7BIT = '_7BIT'

Properties

$headers

$headers : array

Headers

Type

array

$contentType

$contentType : string

Content type

Type

string

$charSet

$charSet : string

Character set

Type

string

$id

$id : string

Message or part ID

Type

string

$idHeader

$idHeader : string

Message or part ID header name

Type

string

$content

$content : string

Message part content

Type

string

$encoding

$encoding : string

Message part encoding

Type

string

Methods

__construct()

__construct(string  $content, string  $contentType = 'text/plain', string  $encoding = null, boolean  $chunk = false) 

Constructor

Instantiate the message part object

Parameters

string $content
string $contentType
string $encoding
boolean $chunk

addHeader()

addHeader(string  $header, string  $value) : \Pop\Mail\Message\AbstractMessage

Add message part header

Parameters

string $header
string $value

Returns

\Pop\Mail\Message\AbstractMessage

addHeaders()

addHeaders(array  $headers) : \Pop\Mail\Message\AbstractMessage

Add message part headers

Parameters

array $headers

Returns

\Pop\Mail\Message\AbstractMessage

hasHeader()

hasHeader(string  $header) : boolean

Determine if message part has header

Parameters

string $header

Returns

boolean

getHeader()

getHeader(string  $header) : string

Get message part header

Parameters

string $header

Returns

string

getHeaders()

getHeaders() : array

Get all message part headers

Returns

array

getContentType()

getContentType() : string

Get message part content type

Returns

string

getCharSet()

getCharSet() : string

Get message part character set

Returns

string

setContentType()

setContentType(string  $contentType) : \Pop\Mail\Message\AbstractMessage

Set message part content type

Parameters

string $contentType

Returns

\Pop\Mail\Message\AbstractMessage

setCharSet()

setCharSet(string  $charSet = null) : \Pop\Mail\Message\AbstractMessage

Set message part character set

Parameters

string $charSet

Returns

\Pop\Mail\Message\AbstractMessage

getHeaderAsString()

getHeaderAsString(string  $header) : string

Get header as string

Parameters

string $header

Returns

string

getHeadersAsString()

getHeadersAsString(array  $omitHeaders = array()) : string

Get all message headers as string

Parameters

array $omitHeaders

Returns

string

setIdHeader()

setIdHeader(string  $header) : \Pop\Mail\Message\AbstractMessage

Set the ID header name

Parameters

string $header

Returns

\Pop\Mail\Message\AbstractMessage

getIdHeader()

getIdHeader() : string

Get the ID

Returns

string

getId()

getId() : string

Get the ID

Returns

string

generateId()

generateId() : string

Generate a new ID

Returns

string

getBody()

getBody() : string

Get message body

Returns

string

render()

render(array  $omitHeaders = array()) : string

Render message

Parameters

array $omitHeaders

Returns

string

renderAsLines()

renderAsLines(array  $omitHeaders = array()) : array

Render as an array of lines

Parameters

array $omitHeaders

Returns

array

__toString()

__toString() : string

Render message to string

Returns

string

getContent()

getContent() : string

Get message part content

Returns

string

setContent()

setContent(string  $content) : \Pop\Mail\Message\AbstractPart

Set message part content

Parameters

string $content

Returns

\Pop\Mail\Message\AbstractPart

getEncoding()

getEncoding() : string

Get message part encoding

Returns

string

setEncoding()

setEncoding(string  $encoding) : \Pop\Mail\Message\AbstractPart

Set message part encoding

Parameters

string $encoding

Returns

\Pop\Mail\Message\AbstractPart

isBase64()

isBase64() : string

Check if encoding in base-64

Returns

string

getRandomId()

getRandomId() : string

Returns a random ID

Returns

string