MailMessage
class MailMessage extends SimpleMessage
Properties
string | $level | The "level" of the notification (info, success, error). |
from SimpleMessage |
string | $subject | The subject of the notification. |
from SimpleMessage |
string | $greeting | The notification's greeting. |
from SimpleMessage |
string | $salutation | The notification's salutation. |
from SimpleMessage |
array | $introLines | The "intro" lines of the notification. |
from SimpleMessage |
array | $outroLines | The "outro" lines of the notification. |
from SimpleMessage |
string | $actionText | The text / label for the action. |
from SimpleMessage |
string | $actionUrl | The action URL. |
from SimpleMessage |
array|string | $view | The view to be rendered. |
|
array | $viewData | The view data for the message. |
|
string|null | $markdown | The Markdown template to render (if applicable). |
|
array | $from | The "from" information for the message. |
|
array | $replyTo | The "reply to" information for the message. |
|
array | $cc | The "cc" information for the message. |
|
array | $bcc | The "bcc" information for the message. |
|
array | $attachments | The attachments for the message. |
|
array | $rawAttachments | The raw attachments for the message. |
|
int | $priority | Priority level of the message. |
Methods
Indicate that the notification gives information about a successful operation.
Set the "level" of the notification (success, error, etc.).
Set the view for the mail message.
Set the Markdown template for the notification.
Set the from address for the mail message.
Set the "reply to" address of the message.
Set the cc address for the mail message.
Set the bcc address for the mail message.
Attach a file to the message.
Attach in-memory data as an attachment.
Set the priority of this message.
Get the data array for the mail message.
Details
in
SimpleMessage at line 70
$this
success()
Indicate that the notification gives information about a successful operation.
in
SimpleMessage at line 82
$this
error()
Indicate that the notification gives information about an error.
in
SimpleMessage at line 95
$this
level(string $level)
Set the "level" of the notification (success, error, etc.).
in
SimpleMessage at line 108
$this
subject(string $subject)
Set the subject of the notification.
in
SimpleMessage at line 121
$this
greeting(string $greeting)
Set the greeting of the notification.
in
SimpleMessage at line 134
$this
salutation(string $salutation)
Set the salutation of the notification.
in
SimpleMessage at line 147
$this
line(Action|string $line)
Add a line of text to the notification.
in
SimpleMessage at line 158
$this
with(Action|string|array $line)
Add a line of text to the notification.
in
SimpleMessage at line 177
protected string
formatLine(string|array $line)
Format the given line of text.
in
SimpleMessage at line 193
$this
action(string $text, string $url)
Configure the "call to action" button.
in
SimpleMessage at line 206
array
toArray()
Get an array representation of the message.
at line 84
$this
view(array|string $view, array $data = [])
Set the view for the mail message.
at line 101
$this
markdown(string $view, array $data = [])
Set the Markdown template for the notification.
at line 118
$this
from(string $address, string|null $name = null)
Set the from address for the mail message.
at line 132
$this
replyTo(array|string $address, string|null $name = null)
Set the "reply to" address of the message.
at line 146
$this
cc(string $address, string|null $name = null)
Set the cc address for the mail message.
at line 160
$this
bcc(string $address, string|null $name = null)
Set the bcc address for the mail message.
at line 174
$this
attach(string $file, array $options = [])
Attach a file to the message.
at line 189
$this
attachData(string $data, string $name, array $options = [])
Attach in-memory data as an attachment.
at line 204
$this
priority(int $level)
Set the priority of this message.
The value is an integer where 1 is the highest priority and 5 is the lowest.
at line 216
array
data()
Get the data array for the mail message.