Envelope
class Envelope
Traits
Properties
| Address|string|null | $from | The address sending the message. |
|
| array | $to | The recipients of the message. |
|
| array | $cc | The recipients receiving a copy of the message. |
|
| array | $bcc | The recipients receiving a blind copy of the message. |
|
| array | $replyTo | The recipients that should be replied to. |
|
| string|null | $subject | The subject of the message. |
|
| array | $tags | The message's tags. |
|
| array | $metadata | The message's metadata. |
|
| array | $using | The message's Symfony Message customization callbacks. |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a new message envelope instance.
Normalize the given array of addresses.
Determine if the message is from the given address.
Determine if the message has the given address as a recipient.
Determine if the message has the given address as a "cc" recipient.
Determine if the message has the given address as a "bcc" recipient.
Determine if the message has the given address as a "reply to" recipient.
Determine if the message has the given subject.
Determine if the message has the given metadata.
Determine if the message has the given recipient.
Details
in
Conditionable at line 23
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
in
Conditionable at line 56
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
at line 71
__construct(Address|string|null $from = null, Address|string> $to = [], Address|string> $cc = [], Address|string> $bcc = [], Address|string> $replyTo = [], string|null $subject = null, array $tags = [], array $metadata = [], array|Closure $using = [])
Create a new message envelope instance.
at line 90
protected array
normalizeAddresses(array $addresses)
Normalize the given array of addresses.
at line 100
Envelope
from(Address|string $address, string|null $name = null)
Specify who the message will be "from".
at line 110
Envelope
to(Address|array|string $address, string|null $name = null)
Add a "to" recipient to the message envelope.
at line 122
Envelope
cc(Address|array|string $address, string|null $name = null)
Add a "cc" recipient to the message envelope.
at line 134
Envelope
bcc(Address|array|string $address, string|null $name = null)
Add a "bcc" recipient to the message envelope.
at line 146
Envelope
replyTo(Address|array|string $address, string|null $name = null)
Add a "reply to" recipient to the message envelope.
at line 158
Envelope
subject(string $subject)
Set the subject of the message.
at line 168
Envelope
tags(array $tags)
Add "tags" to the message.
at line 178
Envelope
tag(string $tag)
Add a "tag" to the message.
at line 188
Envelope
metadata(string $key, int|string $value)
Add metadata to the message.
at line 198
Envelope
using(Closure $callback)
Add a Symfony Message customization callback to the message.
at line 208
bool
isFrom(string $address, string|null $name = null)
Determine if the message is from the given address.
at line 221
bool
hasTo(string $address, string|null $name = null)
Determine if the message has the given address as a recipient.
at line 229
bool
hasCc(string $address, string|null $name = null)
Determine if the message has the given address as a "cc" recipient.
at line 237
bool
hasBcc(string $address, string|null $name = null)
Determine if the message has the given address as a "bcc" recipient.
at line 245
bool
hasReplyTo(string $address, string|null $name = null)
Determine if the message has the given address as a "reply to" recipient.
at line 253
bool
hasSubject(string $subject)
Determine if the message has the given subject.
at line 261
bool
hasMetadata(string $key, int|string $value)
Determine if the message has the given metadata.
at line 269
protected bool
hasRecipient(array $recipients, string $address, string|null $name = null)
Determine if the message has the given recipient.