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

Message

Uses

Properties

protected

$message Symfony\...\Email

The Symfony Email instance.

Default: null
deprecated protected

$embeddedFiles array

CIDs of files embedded in the message.

Default: []

Methods

public

__construct ( Symfony\...\Email $message ) : void

Create a new message instance.

Parameters

  • $message Symfony\...\Email
public

from ( $address , $name ) : $this

Add a "from" address to the message.

Parameters

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

sender ( $address , $name ) : $this

Set the "sender" of the message.

Parameters

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

returnPath ( $address ) : $this

Set the "return path" of the message.

Parameters

  • $address string
public

to ( $address , $name , $override ) : $this

Add a recipient to the message.

Parameters

  • $address string|array
  • $name string|null
  • $override bool
public

forgetTo ( ) : $this

Remove all "to" addresses from the message.

public

cc ( $address , $name , $override ) : $this

Add a carbon copy to the message.

Parameters

  • $address string|array
  • $name string|null
  • $override bool
public

forgetCc ( ) : $this

Remove all carbon copy addresses from the message.

public

bcc ( $address , $name , $override ) : $this

Add a blind carbon copy to the message.

Parameters

  • $address string|array
  • $name string|null
  • $override bool
public

forgetBcc ( ) : $this

Remove all of the blind carbon copy addresses from the message.

public

replyTo ( $address , $name ) : $this

Add a "reply to" address to the message.

Parameters

  • $address string|array
  • $name string|null
protected

addAddresses ( $address , $name , $type ) : $this

Add a recipient to the message.

Parameters

  • $address string|array
  • $name string
  • $type string
protected

addAddressDebugHeader ( string $header , array $addresses ) : $this

Add an address debug header for a list of recipients.

Parameters

  • $header string
  • $addresses Symfony\...\Address[]
public

subject ( $subject ) : $this

Set the subject of the message.

Parameters

  • $subject string
public

priority ( $level ) : $this

Set the message priority level.

Parameters

  • $level int
public

attach ( $file , array $options ) : $this

Attach a file to the message.

Parameters

public

attachData ( $data , $name , array $options ) : $this

Attach in-memory data as an attachment.

Parameters

  • $data string|resource
  • $name string
  • $options array
public

embed ( $file ) : string

Embed a file in the message and get the CID.

Parameters

public

embedData ( $data , $name , $contentType ) : string

Embed in-memory data in the message and get the CID.

Parameters

  • $data string|resource
  • $name string
  • $contentType string|null
public

getSymfonyMessage ( ) : Symfony\...\Email

Get the underlying Symfony Email instance.

public

__call ( $method , $parameters ) : mixed

Dynamically pass missing methods to the Symfony instance.

Parameters

  • $method string
  • $parameters array