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
Returns the sender of the message.
Adds the reply-to address.
Sets the subject of the message.
Returns the subject of the message.
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 43
__construct()
No description
at line 58
Message
setFrom($email, $name = null)
Sets the sender of the message.
at line 69
array
getFrom()
Returns the sender of the message.
at line 81
Message
addReplyTo($email, $name = null)
Adds the reply-to address.
at line 93
Message
setSubject($subject)
Sets the subject of the message.
at line 104
string|null
getSubject()
Returns the subject of the message.
at line 116
Message
addTo($email, $name = null)
Adds email recipient.
at line 129
Message
addCc($email, $name = null)
Adds carbon copy email recipient.
at line 142
Message
addBcc($email, $name = null)
Adds blind carbon copy email recipient.
at line 170
Message
setReturnPath($email)
Sets the Return-Path header of the message.
at line 181
string
getReturnPath()
Returns the Return-Path header.
at line 192
Message
setPriority($priority)
Sets email priority.
at line 203
int
getPriority()
Returns email priority.
at line 215
Message
setHtmlBody($html, $basePath = null)
Sets HTML body.
at line 265
string
getHtmlBody()
Gets HTML body.
at line 278
MimePart
addEmbeddedFile($file, $content = null, $contentType = null)
Adds embedded file.
at line 304
MimePart
addAttachment($file, $content = null, $contentType = null)
Adds attachment.
at line 314
MimePart[]
getAttachments()
Gets all email attachments.
at line 363
string
generateMessage()
Returns encoded message.
at line 373
protected Message
build()
Builds email. Does not modify itself, but returns a new object.
at line 422
protected string
buildText($html)
Builds text content.