class PendingMailFake extends PendingMail (View source)

Traits

Properties

protected Mailer $mailer

The mailer instance.

from  PendingMail
protected string $locale

The locale of the message.

from  PendingMail
protected array $to

The "to" recipients of the message.

from  PendingMail
protected array $cc

The "cc" recipients of the message.

from  PendingMail
protected array $bcc

The "bcc" recipients of the message.

from  PendingMail

Methods

$this|TWhenReturnType
when($value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

$this|TUnlessReturnType
unless($value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

void
__construct(Mailer $mailer)

Create a new instance.

$this
locale(string $locale)

Set the locale of the message.

$this
to(mixed $users)

Set the recipients of the message.

$this
cc(mixed $users)

Set the recipients of the message.

$this
bcc(mixed $users)

Set the recipients of the message.

send(Mailable $mailable)

Send a new mailable message instance.

sendNow(Mailable $mailable)

Send a new mailable message instance synchronously.

mixed
queue(Mailable $mailable)

Push the given mailable onto the queue.

mixed
later(DateTimeInterface|DateInterval|int $delay, Mailable $mailable)

Deliver the queued message after (n) seconds.

fill(Mailable $mailable)

Populate the mailable with the addresses.

Details

$this|TWhenReturnType when($value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

Parameters

$value
callable|null $callback
callable|null $default

Return Value

$this|TWhenReturnType

$this|TUnlessReturnType unless($value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

Parameters

$value
callable|null $callback
callable|null $default

Return Value

$this|TUnlessReturnType

void __construct(Mailer $mailer)

Create a new instance.

Parameters

Mailer $mailer

Return Value

void

$this locale(string $locale)

Set the locale of the message.

Parameters

string $locale

Return Value

$this

$this to(mixed $users)

Set the recipients of the message.

Parameters

mixed $users

Return Value

$this

$this cc(mixed $users)

Set the recipients of the message.

Parameters

mixed $users

Return Value

$this

$this bcc(mixed $users)

Set the recipients of the message.

Parameters

mixed $users

Return Value

$this

SentMessage|null send(Mailable $mailable)

Send a new mailable message instance.

Parameters

Mailable $mailable

Return Value

SentMessage|null

SentMessage|null sendNow(Mailable $mailable)

Send a new mailable message instance synchronously.

Parameters

Mailable $mailable

Return Value

SentMessage|null

mixed queue(Mailable $mailable)

Push the given mailable onto the queue.

Parameters

Mailable $mailable

Return Value

mixed

mixed later(DateTimeInterface|DateInterval|int $delay, Mailable $mailable)

Deliver the queued message after (n) seconds.

Parameters

DateTimeInterface|DateInterval|int $delay
Mailable $mailable

Return Value

mixed

protected Mailable fill(Mailable $mailable)

Populate the mailable with the addresses.

Parameters

Mailable $mailable

Return Value

Mailable