Message
in package
implements
Stringable
Class Message.
Interfaces, Classes, Traits and Enums
- Stringable
Table of Contents
- $attachments : array<string|int, mixed>
- A list of attachments with Content-Disposition equals `attachment`.
- $bcc : array<string|int, mixed>
- An associative array used in the `Bcc` header.
- $boundary : string
- The message boundary.
- $cc : array<string|int, mixed>
- An associative array used in the `Cc` header.
- $date : string|null
- The message Date.
- $from : array<string|int, mixed>
- The values used in the `From` header.
- $headers : array<string|int, mixed>
- $htmlMessage : string
- The HTML message.
- $inlineAttachments : array<string|int, mixed>
- An associative array of attachments with Content-Disposition equals `inline`.
- $mailer : Mailer
- The Mailer instance.
- $plainMessage : string
- The plain text message.
- $replyTo : array<string|int, mixed>
- An associative array used in the `Reply-To` header.
- $to : array<string|int, mixed>
- An associative array used in the `To` header.
- $xPriority : XPriority
- The message X-Priority.
- __toString() : string
- addAttachment() : static
- addBcc() : static
- Add Blind Carbon Copy email address.
- addCc() : static
- Add Carbon Copy email address.
- addReplyTo() : static
- addTo() : static
- getAttachments() : array<int, string>
- getBcc() : array<string, string|null>
- getBoundary() : string
- getCc() : array<string, string|null>
- getDate() : string|null
- getFrom() : array<int, string|null>
- getFromAddress() : string|null
- getFromName() : string|null
- getHeader() : string|null
- getHeaderLines() : array<int, string>
- getHeaders() : array<string, string>
- getHtmlMessage() : string|null
- getInlineAttachments() : array<string, string>
- getPlainMessage() : string|null
- getRecipients() : array<int, string>
- getReplyTo() : array<string, string|null>
- getSubject() : string|null
- getTo() : array<string, string|null>
- getXPriority() : XPriority|null
- setBoundary() : static
- setDate() : static
- setFrom() : static
- setHeader() : static
- setHtmlMessage() : static
- setInlineAttachment() : static
- setMailer() : static
- setPlainMessage() : static
- setSubject() : static
- setXPriority() : static
- formatAddress() : string
- formatAddressList() : string
- getCharset() : string
- getContentType() : string
- getCrlf() : string
- prepareHeaders() : void
- renderAttachments() : string
- renderData() : string
- renderHeaders() : string
- renderHtmlMessage() : string|null
- renderInlineAttachments() : string
- renderMessage() : string
- renderPlainMessage() : string|null
Properties
$attachments
A list of attachments with Content-Disposition equals `attachment`.
protected
array<string|int, mixed>
$attachments
= []
The filenames
$bcc
An associative array used in the `Bcc` header.
protected
array<string|int, mixed>
$bcc
= []
The email addresses as keys and the optional name as values
$boundary
The message boundary.
protected
string
$boundary
$cc
An associative array used in the `Cc` header.
protected
array<string|int, mixed>
$cc
= []
The email addresses as keys and the optional name as values
$date
The message Date.
protected
string|null
$date
= null
$from
The values used in the `From` header.
protected
array<string|int, mixed>
$from
= []
The email address as in the index 0 and the optional name in the index 1
$headers
protected
array<string|int, mixed>
$headers
= ['mime-version' => '1.0']
$htmlMessage
The HTML message.
protected
string
$htmlMessage
$inlineAttachments
An associative array of attachments with Content-Disposition equals `inline`.
protected
array<string|int, mixed>
$inlineAttachments
= []
The Content-ID's as keys and the filenames as values
$mailer
The Mailer instance.
protected
Mailer
$mailer
$plainMessage
The plain text message.
protected
string
$plainMessage
$replyTo
An associative array used in the `Reply-To` header.
protected
array<string|int, mixed>
$replyTo
= []
The email addresses as keys and the optional name as values
$to
An associative array used in the `To` header.
protected
array<string|int, mixed>
$to
= []
The email addresses as keys and the optional name as values
$xPriority
The message X-Priority.
protected
XPriority
$xPriority
Methods
__toString()
public
__toString() : string
Return values
string —addAttachment()
public
addAttachment(string $filename) : static
Parameters
- $filename : string
-
The filename
Return values
static —addBcc()
Add Blind Carbon Copy email address.
public
addBcc(string $address[, string|null $name = null ]) : static
Parameters
- $address : string
- $name : string|null = null
Return values
static —addCc()
Add Carbon Copy email address.
public
addCc(string $address[, string|null $name = null ]) : static
Parameters
- $address : string
- $name : string|null = null
Return values
static —addReplyTo()
public
addReplyTo(string $address[, string|null $name = null ]) : static
Parameters
- $address : string
- $name : string|null = null
Return values
static —addTo()
public
addTo(string $address[, string|null $name = null ]) : static
Parameters
- $address : string
- $name : string|null = null
Return values
static —getAttachments()
public
getAttachments() : array<int, string>
Return values
array<int, string> —getBcc()
public
getBcc() : array<string, string|null>
Return values
array<string, string|null> —getBoundary()
public
getBoundary() : string
Return values
string —getCc()
public
getCc() : array<string, string|null>
Return values
array<string, string|null> —getDate()
public
getDate() : string|null
Return values
string|null —getFrom()
public
getFrom() : array<int, string|null>
Return values
array<int, string|null> —getFromAddress()
public
getFromAddress() : string|null
Return values
string|null —getFromName()
public
getFromName() : string|null
Return values
string|null —getHeader()
public
getHeader(string $name) : string|null
Parameters
- $name : string
Return values
string|null —getHeaderLines()
public
getHeaderLines() : array<int, string>
Return values
array<int, string> —getHeaders()
public
getHeaders() : array<string, string>
Return values
array<string, string> —getHtmlMessage()
public
getHtmlMessage() : string|null
Return values
string|null —getInlineAttachments()
public
getInlineAttachments() : array<string, string>
Return values
array<string, string> —getPlainMessage()
public
getPlainMessage() : string|null
Return values
string|null —getRecipients()
public
getRecipients() : array<int, string>
Return values
array<int, string> —getReplyTo()
public
getReplyTo() : array<string, string|null>
Return values
array<string, string|null> —getSubject()
public
getSubject() : string|null
Return values
string|null —getTo()
public
getTo() : array<string, string|null>
Return values
array<string, string|null> —getXPriority()
public
getXPriority() : XPriority|null
Return values
XPriority|null —setBoundary()
public
setBoundary([string $boundary = null ]) : static
Parameters
- $boundary : string = null
Return values
static —setDate()
public
setDate([DateTime|null $datetime = null ]) : static
Parameters
- $datetime : DateTime|null = null
Return values
static —setFrom()
public
setFrom(string $address[, string|null $name = null ]) : static
Parameters
- $address : string
- $name : string|null = null
Return values
static —setHeader()
public
setHeader(string $name, string $value) : static
Parameters
- $name : string
- $value : string
Return values
static —setHtmlMessage()
public
setHtmlMessage(string $message) : static
Parameters
- $message : string
Return values
static —setInlineAttachment()
public
setInlineAttachment(string $filename, string $cid) : static
Parameters
- $filename : string
-
The filename
- $cid : string
-
The Content-ID
Return values
static —setMailer()
public
setMailer(Mailer $mailer) : static
Parameters
- $mailer : Mailer
-
The Mailer instance
Return values
static —setPlainMessage()
public
setPlainMessage(string $message) : static
Parameters
- $message : string
Return values
static —setSubject()
public
setSubject(string $subject) : static
Parameters
- $subject : string
Return values
static —setXPriority()
public
setXPriority(XPriority $priority) : static
Parameters
- $priority : XPriority
Return values
static —formatAddress()
protected
static formatAddress(string $address[, string $name = null ]) : string
Parameters
- $address : string
- $name : string = null
Return values
string —formatAddressList()
protected
static formatAddressList(array<string, string|null> $addresses) : string
Parameters
- $addresses : array<string, string|null>
Return values
string —getCharset()
protected
getCharset() : string
Return values
string —getContentType()
protected
getContentType(string $filename) : string
Parameters
- $filename : string
Return values
string —getCrlf()
protected
getCrlf() : string
Return values
string —prepareHeaders()
protected
prepareHeaders() : void
Return values
void —renderAttachments()
protected
renderAttachments() : string
Return values
string —renderData()
protected
renderData() : string
Return values
string —renderHeaders()
protected
renderHeaders() : string
Return values
string —renderHtmlMessage()
protected
renderHtmlMessage() : string|null
Return values
string|null —renderInlineAttachments()
protected
renderInlineAttachments() : string
Return values
string —renderMessage()
protected
renderMessage(string $message[, string $contentType = 'text/html' ]) : string
Parameters
- $message : string
- $contentType : string = 'text/html'
Return values
string —renderPlainMessage()
protected
renderPlainMessage() : string|null