Documentation

AbstractMessage
in package
implements MessageInterface

AbstractYes

Abstract mail message class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.0.0

Table of Contents

Interfaces

MessageInterface
Mail message interface

Properties

$charSet  : string|null
Character set
$contentType  : string|null
Content type
$headers  : array<string|int, mixed>
Headers
$id  : string|null
Message or part ID
$idHeader  : string|null
Message or part ID header name

Methods

__construct()  : mixed
Constructor
__toString()  : string
Render message to string
addHeader()  : AbstractMessage
Add message part header
addHeaders()  : AbstractMessage
Add message part headers
generateId()  : string
Generate a new ID
getBody()  : string|null
Get body
getCharSet()  : string|null
Get message part character set
getContentType()  : string|null
Get message part content type
getHeader()  : string|null
Get message part header
getHeaderAsString()  : string|null
Get header as string
getHeaders()  : array<string|int, mixed>
Get all message part headers
getHeadersAsString()  : string
Get all message headers as string
getId()  : string|null
Get the ID
getIdHeader()  : string|null
Get the ID
hasHeader()  : bool
Determine if message part has header
render()  : string
Render
renderAsLines()  : array<string|int, mixed>
Render as an array of lines
setCharSet()  : AbstractMessage
Set message part character set
setContentType()  : AbstractMessage
Set message part content type
setId()  : AbstractMessage
Set the ID
setIdHeader()  : AbstractMessage
Set the ID header name
getRandomId()  : string
Returns a random ID

Properties

$idHeader

Message or part ID header name

protected string|null $idHeader = null

Methods

__construct()

Constructor

public __construct() : mixed

Instantiate the message object

__toString()

Render message to string

public __toString() : string
Return values
string

generateId()

Generate a new ID

public generateId([string|null $domain = null ]) : string
Parameters
$domain : string|null = null
Tags
string

?string $domain

Return values
string

getBody()

Get body

public abstract getBody() : string|null
Return values
string|null

getCharSet()

Get message part character set

public getCharSet() : string|null
Return values
string|null

getContentType()

Get message part content type

public getContentType() : string|null
Return values
string|null

getHeader()

Get message part header

public getHeader(string $header) : string|null
Parameters
$header : string
Return values
string|null

getHeaderAsString()

Get header as string

public getHeaderAsString(string $header) : string|null
Parameters
$header : string
Return values
string|null

getHeaders()

Get all message part headers

public getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHeadersAsString()

Get all message headers as string

public getHeadersAsString([array<string|int, mixed> $omitHeaders = [] ]) : string
Parameters
$omitHeaders : array<string|int, mixed> = []
Return values
string

getId()

Get the ID

public getId() : string|null
Return values
string|null

getIdHeader()

Get the ID

public getIdHeader() : string|null
Return values
string|null

hasHeader()

Determine if message part has header

public hasHeader(string $header) : bool
Parameters
$header : string
Return values
bool

render()

Render

public abstract render() : string
Return values
string

renderAsLines()

Render as an array of lines

public abstract renderAsLines() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRandomId()

Returns a random ID

protected getRandomId([string|null $idRight = null ]) : string
Parameters
$idRight : string|null = null
Tags
string

?string $idRight

Return values
string

        
On this page

Search results