Message
class Message extends MimePart
Mail provides functionality to compose and send both text and MIME-compliant multipart email messages.
Constants
HIGH |
Priority |
NORMAL |
Priority |
LOW |
Priority |
Properties
static array | $defaultHeaders | ||
string | $subject | ||
string | $htmlBody |
Methods
No description
Sets the sender of the message. Email or format "John Doe" doe@example.com
Returns the sender of the message.
Adds the reply-to address. Email or format "John Doe" doe@example.com
Sets the subject of the message.
Returns the subject of the message.
Adds email recipient. Email or format "John Doe" doe@example.com
Adds carbon copy email recipient. Email or format "John Doe" doe@example.com
Adds blind carbon copy email recipient. Email or format "John Doe" doe@example.com
Sets the Return-Path header of the message.
Returns the Return-Path header.
Sets email priority.
Returns email priority.
Sets HTML body.
Gets HTML body.
Adds embedded file.
Adds attachment.
Gets all email attachments.
Returns encoded message.
Builds text content.
Details
at line 46
__construct()
No description
at line 59
Message
setFrom(string $email, string $name = null)
Sets the sender of the message. Email or format "John Doe" doe@example.com
at line 69
array|null
getFrom()
Returns the sender of the message.
at line 79
Message
addReplyTo(string $email, string $name = null)
Adds the reply-to address. Email or format "John Doe" doe@example.com
at line 90
Message
setSubject(string $subject)
Sets the subject of the message.
at line 100
string|null
getSubject()
Returns the subject of the message.
at line 110
Message
addTo(string $email, string $name = null)
Adds email recipient. Email or format "John Doe" doe@example.com
at line 121
Message
addCc(string $email, string $name = null)
Adds carbon copy email recipient. Email or format "John Doe" doe@example.com
at line 132
Message
addBcc(string $email, string $name = null)
Adds blind carbon copy email recipient. Email or format "John Doe" doe@example.com
at line 160
Message
setReturnPath(string $email)
Sets the Return-Path header of the message.
at line 170
string|null
getReturnPath()
Returns the Return-Path header.
at line 180
Message
setPriority(int $priority)
Sets email priority.
at line 190
int|null
getPriority()
Returns email priority.
at line 201
Message
setHtmlBody(string $html, string $basePath = null)
Sets HTML body.
at line 250
string
getHtmlBody()
Gets HTML body.
at line 259
MimePart
addEmbeddedFile(string $file, string $content = null, string $contentType = null)
Adds embedded file.
at line 280
MimePart
addAttachment(string $file, string $content = null, string $contentType = null)
Adds attachment.
at line 290
array
getAttachments()
Gets all email attachments.
at line 333
string
generateMessage()
Returns encoded message.
at line 343
Message
build()
Builds email. Does not modify itself, but returns a new object.
at line 390
protected string
buildText(string $html)
Builds text content.