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 |
deprecated HIGH |
|
deprecated NORMAL |
|
deprecated LOW |
|
Properties
static | $defaultHeaders |
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 49
__construct()
No description
at line 62
Message
setFrom(string $email, string|null $name = null)
Sets the sender of the message. Email or format "John Doe" doe@example.com
at line 72
array|null
getFrom()
Returns the sender of the message.
at line 81
Message
addReplyTo(string $email, string|null $name = null)
Adds the reply-to address. Email or format "John Doe" doe@example.com
at line 91
Message
setSubject(string $subject)
Sets the subject of the message.
at line 101
string|null
getSubject()
Returns the subject of the message.
at line 110
Message
addTo(string $email, string|null $name = null)
Adds email recipient. Email or format "John Doe" doe@example.com
at line 120
Message
addCc(string $email, string|null $name = null)
Adds carbon copy email recipient. Email or format "John Doe" doe@example.com
at line 130
Message
addBcc(string $email, string|null $name = null)
Adds blind carbon copy email recipient. Email or format "John Doe" doe@example.com
at line 158
Message
setReturnPath(string $email)
Sets the Return-Path header of the message.
at line 168
string|null
getReturnPath()
Returns the Return-Path header.
at line 177
Message
setPriority(int $priority)
Sets email priority.
at line 187
int|null
getPriority()
Returns email priority.
at line 197
Message
setHtmlBody(string $html, string|null $basePath = null)
Sets HTML body.
at line 247
string
getHtmlBody()
Gets HTML body.
at line 256
MimePart
addEmbeddedFile(string $file, string|null $content = null, string|null $contentType = null)
Adds embedded file.
at line 276
MimePart
addAttachment(string $file, string|null $content = null, string|null $contentType = null)
Adds attachment.
at line 286
array
getAttachments()
Gets all email attachments.
at line 332
string
generateMessage()
Returns encoded message.
at line 341
Message
build()
Builds email. Does not modify itself, but returns a new object.
at line 389
protected string
buildText(string $html)
Builds text content.