class Illuminate / Mail / Mailables / Envelope
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Envelope

Uses

Properties

public

$from Address |string|null

The address sending the message.

Default: null
public

$to array

The recipients of the message.

Default: null
public

$cc array

The recipients receiving a copy of the message.

Default: null
public

$bcc array

The recipients receiving a blind copy of the message.

Default: null
public

$replyTo array

The recipients that should be replied to.

Default: null
public

$subject string|null

The subject of the message.

Default: null
public

$tags array

The message's tags.

Default: []
public

$metadata array

The message's meta data.

Default: []
public

$using array

The message's Symfony Message customization callbacks.

Default: []

Methods

public

__construct ( $from , $to , $cc , $bcc , $replyTo , string $subject , array $tags , array $metadata , $using ) : void

Create a new message envelope instance.

Parameters

  • $from Address |string|null
  • $to array
  • $cc array
  • $bcc array
  • $replyTo array
  • $subject string|null
  • $tags array
  • $metadata array
  • $using Closure |array
protected

normalizeAddresses ( $addresses ) : array

Normalize the given array of addresses.

Parameters

  • $addresses array
public

from ( $address , $name ) : $this

Specify who the message will be "from".

Parameters

  • $address Address |string
  • $name string|null
public

to ( $address , $name ) : $this

Add a "to" recipient to the message envelope.

Parameters

  • $address Address |array|string
  • $name string|null
public

cc ( $address , $name ) : $this

Add a "cc" recipient to the message envelope.

Parameters

  • $address Address |array|string
  • $name string|null
public

bcc ( $address , $name ) : $this

Add a "bcc" recipient to the message envelope.

Parameters

  • $address Address |array|string
  • $name string|null
public

replyTo ( $address , $name ) : $this

Add a "reply to" recipient to the message envelope.

Parameters

  • $address Address |array|string
  • $name string|null
public

subject ( string $subject ) : $this

Set the subject of the message.

Parameters

  • $subject string
public

tags ( array $tags ) : $this

Add "tags" to the message.

Parameters

  • $tags array
public

tag ( string $tag ) : $this

Add a "tag" to the message.

Parameters

  • $tag string
public

metadata ( string $key , $value ) : $this

Add metadata to the message.

Parameters

  • $key string
  • $value string|int
public

using ( Closure $callback ) : $this

Add a Symfony Message customization callback to the message.

Parameters

public

isFrom ( string $address , string $name ) : bool

Determine if the message is from the given address.

Parameters

  • $address string
  • $name string|null
public

hasTo ( string $address , string $name ) : bool

Determine if the message has the given address as a recipient.

Parameters

  • $address string
  • $name string|null
public

hasCc ( string $address , string $name ) : bool

Determine if the message has the given address as a "cc" recipient.

Parameters

  • $address string
  • $name string|null
public

hasBcc ( string $address , string $name ) : bool

Determine if the message has the given address as a "bcc" recipient.

Parameters

  • $address string
  • $name string|null
public

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
protected

hasRecipient ( array $recipients , string $address , string $name ) : bool

Determine if the message has the given recipient.

Parameters

  • $recipients array
  • $address string
  • $name string|null
public

hasSubject ( string $subject ) : bool

Determine if the message has the given subject.

Parameters

  • $subject string
public

hasMetadata ( string $key , string $value ) : bool

Determine if the message has the given metadata.

Parameters

  • $key string
  • $value string