Message class
Framework\Email\Message
Class Message.
Implements:
Stringable
Defined in libraries/email/src/Message.php
Properties #
- $mailer
- The Mailer instance.
- $boundary
- The message boundary.
- $headers
- -
- $attachments
- A list of attachments with Content-Disposition equals `attachment`.
- $inlineAttachments
- An associative array of attachments with Content-Disposition equals `inline`.
- $plainMessage
- The plain text message.
- $htmlMessage
- The HTML message.
- $to
- An associative array used in the `To` header.
- $cc
- An associative array used in the `Cc` header.
- $bcc
- An associative array used in the `Bcc` header.
- $replyTo
- An associative array used in the `Reply-To` header.
- $from
- The values used in the `From` header.
- $date
- The message Date.
$mailer
The Mailer instance.
$boundary
The message boundary.
$headers
$attachments
A list of attachments with Content-Disposition equals `attachment`.
$inlineAttachments
An associative array of attachments with Content-Disposition equals `inline`.
$plainMessage
The plain text message.
$htmlMessage
The HTML message.
$to
An associative array used in the `To` header.
$cc
An associative array used in the `Cc` header.
$bcc
An associative array used in the `Bcc` header.
$replyTo
An associative array used in the `Reply-To` header.
$from
The values used in the `From` header.
$date
The message Date.
Methods #
- __toString()
- Render the Message as string.
- addAttachment()
- Add a filename to be attached.
- addBcc()
- Add address and name in the Bcc header.
- addCc()
- Add address and name in the Cc header.
- addReplyTo()
- Add address and name in the Reply-To header.
- addTo()
- Add address and name in the To header.
- getAttachments()
- Get a lis of attachments.
- getBcc()
- Get items of the Bcc header.
- getBoundary()
- Get the boundary.
- getCc()
- Get items of the Cc header.
- getDate()
- Get the Date header.
- getFrom()
- Get the From header items.
- getFromAddress()
- Get the email address of the From header.
- getFromName()
- Get the name of the From header.
- getHeader()
- Get a header.
- getHeaderLines()
- Get header lines.
- getHeaders()
- Get all headers set.
- getHtmlMessage()
- Get the text/html message.
- getInlineAttachments()
- Get a lis of inline attachments.
- getPlainMessage()
- Get the text/plain message.
- getRecipients()
- -
- getReplyTo()
- Get items of the Reply-To header.
- getSubject()
- Get the Subject header.
- getTo()
- Get items of the To header.
- getXMailer()
- Get the X-Mailer header.
- getXPriority()
- Get the X-Priority header.
- removeBcc()
- Remove all items of the Bcc header.
- removeCc()
- Remove all items of the Cc header.
- removeFrom()
- Remove all items of the From header.
- removeHeader()
- Remove a header.
- removeReplyTo()
- Remove all items of the Reply-To header.
- removeTo()
- Remove all items of the To header.
- setBoundary()
- Set the boundary.
- setDate()
- Set the Date header.
- setFrom()
- Set the From header.
- setHeader()
- Set a header.
- setHtmlMessage()
- Set the text/html message.
- setInlineAttachment()
- Set a filename to be attached inline (image).
- setMailer()
- Set the Mailer instance.
- setPlainMessage()
- Set the text/plain message.
- setSubject()
- Set the Subject header.
- setXMailer()
- Set the X-Mailer header.
- setXPriority()
- Set the X-Priority header.
- formatAddress()
- -
- formatAddressList()
- -
- getCharset()
- -
- getContentType()
- -
- getCrlf()
- -
- prepareHeaders()
- -
- renderAttachments()
- -
- renderData()
- -
- renderHeaders()
- -
- renderHtmlMessage()
- -
- renderInlineAttachments()
- -
- renderMessage()
- -
- renderPlainMessage()
- -
__toString()
Render the Message as string.
addAttachment()
Add a filename to be attached.
- string $filename - The filename
addBcc()
Add address and name in the Bcc header.
- string $address - The email address
- ?string $name - The name or null to don't set
addCc()
Add address and name in the Cc header.
- string $address - The email address
- ?string $name - The name or null to don't set
addReplyTo()
Add address and name in the Reply-To header.
- string $address - The email address
- ?string $name - The name or null to don't set
addTo()
Add address and name in the To header.
- string $address - The email address
- ?string $name - The name or null to don't set
getAttachments()
Get a lis of attachments.
getBcc()
Get items of the Bcc header.
getBoundary()
Get the boundary.
getCc()
Get items of the Cc header.
getDate()
Get the Date header.
getFrom()
Get the From header items.
getFromAddress()
Get the email address of the From header.
getFromName()
Get the name of the From header.
getHeader()
Get a header.
- string $name - The header name
getHeaderLines()
Get header lines.
getHeaders()
Get all headers set.
getHtmlMessage()
Get the text/html message.
getInlineAttachments()
Get a lis of inline attachments.
getPlainMessage()
Get the text/plain message.
getRecipients()
getReplyTo()
Get items of the Reply-To header.
getSubject()
Get the Subject header.
getTo()
Get items of the To header.
getXMailer()
Get the X-Mailer header.
getXPriority()
Get the X-Priority header.
removeBcc()
Remove all items of the Bcc header.
removeCc()
Remove all items of the Cc header.
removeFrom()
Remove all items of the From header.
removeHeader()
Remove a header.
- string $name - The header name
removeReplyTo()
Remove all items of the Reply-To header.
removeTo()
Remove all items of the To header.
setBoundary()
Set the boundary.
- ?string $boundary
setDate()
Set the Date header.
- ?DateTime $datetime - A custom DateTime or null to set the current datetime
setFrom()
Set the From header.
- string $address - The email address
- ?string $name - The name or null to don't set
setHeader()
Set a header.
- string $name - The header name
- string $value - The header value
setHtmlMessage()
Set the text/html message.
- string $message - The text/html message
setInlineAttachment()
Set a filename to be attached inline (image).
- string $filename - The filename
- string $cid - The Content-ID
setMailer()
Set the Mailer instance.
- \Framework\Email\Mailer $mailer - The Mailer instance
setPlainMessage()
Set the text/plain message.
- string $message - The text/plain message
setSubject()
Set the Subject header.
- string $subject - The header value
setXMailer()
Set the X-Mailer header.
- ?string $xMailer - The X-Mailer header or null to set the default
setXPriority()
Set the X-Priority header.
- \Framework\Email\XPriority $priority - The {@see XPriority} case
formatAddress()
- string $address
- ?string $name
formatAddressList()
- array $addresses
getCharset()
getContentType()
- string $filename
getCrlf()
prepareHeaders()
renderAttachments()
renderData()
renderHeaders()
renderHtmlMessage()
renderInlineAttachments()
renderMessage()
- string $message
- string $contentType