Envelope
Uses
Properties
$to array
The recipients of the message.
$cc array
The recipients receiving a copy of the message.
$bcc array
The recipients receiving a blind copy of the message.
$replyTo array
The recipients that should be replied to.
$subject string|null
The subject of the message.
$tags array
The message's tags.
$metadata array
The message's meta data.
$using array
The message's Symfony Message customization callbacks.
Methods
__construct ( $from , $to , $cc , $bcc , $replyTo , string $subject , array $tags , array $metadata , $using ) : void
Create a new message envelope instance.
Parameters
normalizeAddresses ( $addresses ) : array
Normalize the given array of addresses.
Parameters
- $addresses array
from ( $address , $name ) : $this
Specify who the message will be "from".
Parameters
- $address Address |string
- $name string|null
to ( $address , $name ) : $this
Add a "to" recipient to the message envelope.
Parameters
- $address Address |array|string
- $name string|null
cc ( $address , $name ) : $this
Add a "cc" recipient to the message envelope.
Parameters
- $address Address |array|string
- $name string|null
bcc ( $address , $name ) : $this
Add a "bcc" recipient to the message envelope.
Parameters
- $address Address |array|string
- $name string|null
replyTo ( $address , $name ) : $this
Add a "reply to" recipient to the message envelope.
Parameters
- $address Address |array|string
- $name string|null
subject ( string $subject ) : $this
Set the subject of the message.
Parameters
- $subject string
tags ( array $tags ) : $this
Add "tags" to the message.
Parameters
- $tags array
tag ( string $tag ) : $this
Add a "tag" to the message.
Parameters
- $tag string
metadata ( string $key , $value ) : $this
Add metadata to the message.
Parameters
- $key string
- $value string|int
using ( Closure $callback ) : $this
Add a Symfony Message customization callback to the message.
Parameters
- $callback Closure
isFrom ( string $address , string $name ) : bool
Determine if the message is from the given address.
Parameters
- $address string
- $name string|null
hasTo ( string $address , string $name ) : bool
Determine if the message has the given address as a recipient.
Parameters
- $address string
- $name string|null
hasCc ( string $address , string $name ) : bool
Determine if the message has the given address as a "cc" recipient.
Parameters
- $address string
- $name string|null
hasBcc ( string $address , string $name ) : bool
Determine if the message has the given address as a "bcc" recipient.
Parameters
- $address string
- $name string|null
hasReplyTo ( string $address , string $name ) : bool
Determine if the message has the given address as a "reply to" recipient.
Parameters
- $address string
- $name string|null
hasRecipient ( array $recipients , string $address , string $name ) : bool
Determine if the message has the given recipient.
Parameters
- $recipients array
- $address string
- $name string|null
hasSubject ( string $subject ) : bool
Determine if the message has the given subject.
Parameters
- $subject string
hasMetadata ( string $key , string $value ) : bool
Determine if the message has the given metadata.
Parameters
- $key string
- $value string