Mailable

Mailable

class Mailable implements Mailable (View source)

Properties

array $from The person the message is from.
array $to The "to" recipients of the message.
array $cc The "cc" recipients of the message.
array $bcc The "bcc" recipients of the message.
array $replyTo The "reply to" recipients of the message.
string $subject The subject of the message.
string $view The view to use for the message.
string $textView The plain text view to use for the message.
array $viewData The view data for the message.
array $attachments The attachments for the message.
array $rawAttachments The raw attachments for the message.
array $callbacks The callbacks for the message.

Methods

void send(Mailer $mailer)

Send the message using the given mailer.

mixed queue(Factory $queue)

Queue the message for sending.

mixed later(DateTime|int $delay, Factory $queue)

Deliver the queued message after the given delay.

array buildViewData()

Build the view data for the message.

$this priority(int $level = 3)

Set the priority of this message.

$this from(object|array|string $address, string|null $name = null)

Set the sender of the message.

$this to(object|array|string $address, string|null $name = null)

Set the recipients of the message.

$this cc(object|array|string $address, string|null $name = null)

Set the recipients of the message.

$this bcc(object|array|string $address, string|null $name = null)

Set the recipients of the message.

$this replyTo(object|array|string $address, string|null $name = null)

Set the "reply to" address of the message.

$this subject(string $subject)

Set the subject of the message.

$this view(string $view, array $data = array())

Set the view and view data for the message.

$this text(string $textView, array $data = array())

Set the plain text view for the message.

$this with(string|array $key, mixed $value = null)

Set the view data for the message.

$this attach(string $file, array $options = array())

Attach a file to the message.

$this attachData(string $data, string $name, array $options = array())

Attach in-memory data as an attachment.

$this withSwiftMessage(callable $callback)

Register a callback to be called with the Swift message instance.

$this __call(string $method, array $parameters)

Dynamically bind parameters to the message.

Details

void send(Mailer $mailer)

Send the message using the given mailer.

Parameters

Mailer $mailer

Return Value

void

mixed queue(Factory $queue)

Queue the message for sending.

Parameters

Factory $queue

Return Value

mixed

mixed later(DateTime|int $delay, Factory $queue)

Deliver the queued message after the given delay.

Parameters

DateTime|int $delay
Factory $queue

Return Value

mixed

array buildViewData()

Build the view data for the message.

Return Value

array

$this priority(int $level = 3)

Set the priority of this message.

The value is an integer where 1 is the highest priority and 5 is the lowest.

Parameters

int $level

Return Value

$this

$this from(object|array|string $address, string|null $name = null)

Set the sender of the message.

Parameters

object|array|string $address
string|null $name

Return Value

$this

$this to(object|array|string $address, string|null $name = null)

Set the recipients of the message.

Parameters

object|array|string $address
string|null $name

Return Value

$this

$this cc(object|array|string $address, string|null $name = null)

Set the recipients of the message.

Parameters

object|array|string $address
string|null $name

Return Value

$this

$this bcc(object|array|string $address, string|null $name = null)

Set the recipients of the message.

Parameters

object|array|string $address
string|null $name

Return Value

$this

$this replyTo(object|array|string $address, string|null $name = null)

Set the "reply to" address of the message.

Parameters

object|array|string $address
string|null $name

Return Value

$this

$this subject(string $subject)

Set the subject of the message.

Parameters

string $subject

Return Value

$this

$this view(string $view, array $data = array())

Set the view and view data for the message.

Parameters

string $view
array $data

Return Value

$this

$this text(string $textView, array $data = array())

Set the plain text view for the message.

Parameters

string $textView
array $data

Return Value

$this

$this with(string|array $key, mixed $value = null)

Set the view data for the message.

Parameters

string|array $key
mixed $value

Return Value

$this

$this attach(string $file, array $options = array())

Attach a file to the message.

Parameters

string $file
array $options

Return Value

$this

$this attachData(string $data, string $name, array $options = array())

Attach in-memory data as an attachment.

Parameters

string $data
string $name
array $options

Return Value

$this

$this withSwiftMessage(callable $callback)

Register a callback to be called with the Swift message instance.

Parameters

callable $callback

Return Value

$this

$this __call(string $method, array $parameters)

Dynamically bind parameters to the message.

Parameters

string $method
array $parameters

Return Value

$this

Exceptions

BadMethodCallException

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Mail/Mailable.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部