Properties

$headers

$headers : array

Headers

Type

array

$parts

$parts : array

Nested parts

Type

array

$subType

$subType : string

Sub-type

Type

string

$boundary

$boundary : string

Boundary

Type

string

Methods

__construct()

__construct() 

Constructor

Instantiate the mime part object

addHeader()

addHeader(\Pop\Mime\Part\Header|string  $header, string  $value = null) : \Pop\Mime\Part

Add a header

Parameters

\Pop\Mime\Part\Header|string $header
string $value

Returns

\Pop\Mime\Part

addHeaders()

addHeaders(array  $headers) : \Pop\Mime\Part

Add headers

Parameters

array $headers

Returns

\Pop\Mime\Part

getHeaders()

getHeaders() : array

Get headers

Returns

array

getHeadersAsArray()

getHeadersAsArray() : array

Get headers as array

Returns

array

getHeader()

getHeader(string  $name) : \Pop\Mime\Part\Header

Get headers

Parameters

string $name

Returns

\Pop\Mime\Part\Header

hasHeader()

hasHeader(string  $name) : boolean

Has header

Parameters

string $name

Returns

boolean

hasHeaders()

hasHeaders() : boolean

Has headers

Returns

boolean

removeHeader()

removeHeader(string  $name) : \Pop\Mime\Part

Remove header

Parameters

string $name

Returns

\Pop\Mime\Part

addFile()

addFile(string  $file, string  $disposition = 'attachment', string  $encoding = \Pop\Mime\Part\Body::BASE64, integer|boolean  $split = true) : \Pop\Mime\Part

Add file as body

Parameters

string $file
string $disposition
string $encoding
integer|boolean $split

Returns

\Pop\Mime\Part

hasBody()

hasBody() : boolean

Has body

Returns

boolean

addParts()

addParts(array  $parts) : \Pop\Mime\Part

Add nested parts

Parameters

array $parts

Returns

\Pop\Mime\Part

getParts()

getParts() : array

Get nested parts

Returns

array

hasParts()

hasParts() : boolean

Has nested parts

Returns

boolean

setSubType()

setSubType(string  $subType) : \Pop\Mime\Part

Set sub-type

Parameters

string $subType

Returns

\Pop\Mime\Part

getSubType()

getSubType() : string

Get sub-type

Returns

string

hasSubType()

hasSubType() : boolean

Has sub-type

Returns

boolean

setBoundary()

setBoundary(string  $boundary) : \Pop\Mime\Part

Set boundary

Parameters

string $boundary

Returns

\Pop\Mime\Part

getBoundary()

getBoundary() : string

Get boundary

Returns

string

hasBoundary()

hasBoundary() : boolean

Has boundary

Returns

boolean

generateBoundary()

generateBoundary() : string

Generate boundary

Returns

string

hasAttachment()

hasAttachment() : boolean

Has attachment (check via a header)

Returns

boolean

hasAttachments()

hasAttachments() : boolean

Does message have attachments (check via parts)

Returns

boolean

getAttachments()

getAttachments() : array

Get attachments

Returns

array

getContentType()

getContentType() : string

Get content-type

Returns

string

getFilename()

getFilename() : string

Get attachment filename

Returns

string

getContents()

getContents() : mixed

Get contents (decoded)

Returns

mixed

renderHeaders()

renderHeaders() : string

Render the part headers

Returns

string

renderParts()

renderParts(boolean  $preamble = true) : string

Render the parts

Parameters

boolean $preamble

Returns

string

renderBody()

renderBody() : string

Render the part body

Returns

string

render()

render(boolean  $preamble = true) : string

Render the part

Parameters

boolean $preamble

Returns

string

__toString()

__toString() : string

Render the part

Returns

string