class Illuminate / Mail / Message
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Message

Uses

Properties

protected

$swift Swift_Message

The Swift Message instance.

Default: null
protected

$embeddedFiles array

CIDs of files embedded in the message.

Default: []

Methods

public

__construct ( $swift ) : void

Create a new message instance.

Parameters

  • $swift Swift_Message
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

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

Add a carbon copy to the message.

Parameters

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

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

Add a blind carbon copy to the message.

Parameters

  • $address string|array
  • $name string|null
  • $override bool
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
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

  • $file string
  • $options array
protected

createAttachmentFromPath ( $file ) : Swift_Mime_Attachment

Create a Swift Attachment instance.

Parameters

  • $file string
public

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

Attach in-memory data as an attachment.

Parameters

  • $data string
  • $name string
  • $options array
protected

createAttachmentFromData ( $data , $name ) : Swift_Attachment

Create a Swift Attachment instance from data.

Parameters

  • $data string
  • $name string
public

embed ( $file ) : string

Embed a file in the message and get the CID.

Parameters

  • $file string
public

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

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

Parameters

  • $data string
  • $name string
  • $contentType string|null
protected

prepAttachment ( $attachment , $options ) : $this

Prepare and attach the given attachment.

Parameters

  • $attachment Swift_Attachment
  • $options array
public

getSwiftMessage ( ) : Swift_Message

Get the underlying Swift Message instance.

public

__call ( $method , $parameters ) : mixed

Dynamically pass missing methods to the Swift instance.

Parameters

  • $method string
  • $parameters array