class MimePart

MIME message part.

Constants

EncodingBase64

encoding

Encoding7Bit

encoding

Encoding8Bit

encoding

EncodingQuotedPrintable

encoding

internal EOL

LineLength

private SequenceValue

value (RFC 2231), encoded-word (RFC 2047)

private SequenceWord

value (RFC 2231), encoded-word (RFC 2047)

Methods

setHeader(string $name, string|array|null $value, bool $append = false)

Sets a header.

mixed
getHeader(string $name)

Returns a header.

clearHeader(string $name)

Removes a header.

string|null
getEncodedHeader(string $name)

Returns an encoded header.

array
getHeaders()

Returns all headers.

setContentType(string $contentType, string|null $charset = null)

Sets Content-Type header.

setEncoding(string $encoding)

Sets Content-Transfer-Encoding header.

string
getEncoding()

Returns Content-Transfer-Encoding header.

addPart(MimePart|null $part = null)

Adds or creates new multipart.

setBody(string $body)

Sets textual body.

string
getBody()

Gets textual body.

string
getEncodedMessage()

Returns encoded message.

Details

at line 51
MimePart setHeader(string $name, string|array|null $value, bool $append = false)

Sets a header.

Parameters

string $name
string|array|null $value

value or pair email => name

bool $append

Return Value

MimePart

at line 95
mixed getHeader(string $name)

Returns a header.

Parameters

string $name

Return Value

mixed

at line 104
MimePart clearHeader(string $name)

Removes a header.

Parameters

string $name

Return Value

MimePart

at line 114
string|null getEncodedHeader(string $name)

Returns an encoded header.

Parameters

string $name

Return Value

string|null

at line 147
array getHeaders()

Returns all headers.

Return Value

array

at line 156
MimePart setContentType(string $contentType, string|null $charset = null)

Sets Content-Type header.

Parameters

string $contentType
string|null $charset

Return Value

MimePart

at line 166
MimePart setEncoding(string $encoding)

Sets Content-Transfer-Encoding header.

Parameters

string $encoding

Return Value

MimePart

at line 176
string getEncoding()

Returns Content-Transfer-Encoding header.

Return Value

string

at line 185
MimePart addPart(MimePart|null $part = null)

Adds or creates new multipart.

Parameters

MimePart|null $part

Return Value

MimePart

at line 194
MimePart setBody(string $body)

Sets textual body.

Parameters

string $body

Return Value

MimePart

at line 204
string getBody()

Gets textual body.

Return Value

string

at line 216
string getEncodedMessage()

Returns encoded message.

Return Value

string

Traits

SmartObject