MessageInterface
in
Mail message interface
Tags
Table of Contents
Methods
- __toString() : string
- Render to string
- addHeader() : MessageInterface
- Add header
- addHeaders() : MessageInterface
- Add headers
- getBody() : string|null
- Get body
- getCharSet() : string|null
- Get character set
- getContentType() : string|null
- Get content type
- getHeader() : string
- Get header
- getHeaderAsString() : string|null
- Get header as string
- getHeaders() : array<string|int, mixed>
- Get all headers
- getHeadersAsString() : string|null
- Get all headers as string
- hasHeader() : bool
- Determine if message has header
- render() : string
- Render
- renderAsLines() : array<string|int, mixed>
- Render as an array of lines
- setCharSet() : MessageInterface
- Set character set
- setContentType() : MessageInterface
- Set content type
Methods
__toString()
Render to string
public
__toString() : string
Return values
stringaddHeader()
Add header
public
addHeader(string $header, string $value) : MessageInterface
Parameters
- $header : string
- $value : string
Return values
MessageInterfaceaddHeaders()
Add headers
public
addHeaders(array<string|int, mixed> $headers) : MessageInterface
Parameters
- $headers : array<string|int, mixed>
Return values
MessageInterfacegetBody()
Get body
public
getBody() : string|null
Return values
string|nullgetCharSet()
Get character set
public
getCharSet() : string|null
Return values
string|nullgetContentType()
Get content type
public
getContentType() : string|null
Return values
string|nullgetHeader()
Get header
public
getHeader(string $header) : string
Parameters
- $header : string
Return values
stringgetHeaderAsString()
Get header as string
public
getHeaderAsString(string $header) : string|null
Parameters
- $header : string
Return values
string|nullgetHeaders()
Get all headers
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>getHeadersAsString()
Get all headers as string
public
getHeadersAsString([array<string|int, mixed> $omitHeaders = [] ]) : string|null
Parameters
- $omitHeaders : array<string|int, mixed> = []
Return values
string|nullhasHeader()
Determine if message has header
public
hasHeader(string $header) : bool
Parameters
- $header : string
Return values
boolrender()
Render
public
render() : string
Return values
stringrenderAsLines()
Render as an array of lines
public
renderAsLines() : array<string|int, mixed>
Return values
array<string|int, mixed>setCharSet()
Set character set
public
setCharSet(string $charSet) : MessageInterface
Parameters
- $charSet : string
Return values
MessageInterfacesetContentType()
Set content type
public
setContentType(string $contentType) : MessageInterface
Parameters
- $contentType : string