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

MailMessage

Extends

Implements

Uses

Properties

public

$view array|string

The view to be rendered.

Default: null
public

$viewData array

The view data for the message.

Default: []
public

$markdown string|null

The Markdown template to render (if applicable).

Default: 'notifications::email'
public

$theme string|null

The current theme being used when generating emails.

Default: null
public

$from array

The "from" information for the message.

Default: []
public

$replyTo array

The "reply to" information for the message.

Default: []
public

$cc array

The "cc" information for the message.

Default: []
public

$bcc array

The "bcc" information for the message.

Default: []
public

$attachments array

The attachments for the message.

Default: []
public

$rawAttachments array

The raw attachments for the message.

Default: []
public

$tags array

The tags for the message.

Default: []
public

$metadata array

The metadata for the message.

Default: []
public

$priority int

Priority level of the message.

Default: null
public

$callbacks array

The callbacks for the message.

Default: []

Methods

public

view ( $view , array $data ) : $this

Set the view for the mail message.

Parameters

  • $view array|string
  • $data array
public

markdown ( $view , array $data ) : $this

Set the Markdown template for the notification.

Parameters

  • $view string
  • $data array
public

template ( $template ) : $this

Set the default markdown template.

Parameters

  • $template string
public

theme ( $theme ) : $this

Set the theme to use with the Markdown template.

Parameters

  • $theme string
public

from ( $address , $name ) : $this

Set the from address for the mail message.

Parameters

  • $address string
  • $name string|null
public

replyTo ( $address , $name ) : $this

Set the "reply to" address of the message.

Parameters

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

cc ( $address , $name ) : $this

Set the cc address for the mail message.

Parameters

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

bcc ( $address , $name ) : $this

Set the bcc address for the mail message.

Parameters

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

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

Attach a file to the message.

Parameters

public

attachMany ( $files ) : $this

Attach multiple files to the message.

Parameters

public

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

Attach in-memory data as an attachment.

Parameters

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

tag ( $value ) : $this

Add a tag header to the message when supported by the underlying transport.

Parameters

  • $value string
public

metadata ( $key , $value ) : $this

Add a metadata header to the message when supported by the underlying transport.

Parameters

  • $key string
  • $value string
public

priority ( $level ) : $this

Set the priority of this message.

Parameters

  • $level int
public

data ( ) : array

Get the data array for the mail message.

protected

parseAddresses ( $value ) : array

Parse the multi-address array into the necessary format.

Parameters

  • $value array
protected

arrayOfAddresses ( $address ) : bool

Determine if the given "address" is actually an array of addresses.

Parameters

  • $address mixed
public

render ( ) : HtmlString

Render the mail notification message into an HTML string.

public

withSymfonyMessage ( $callback ) : $this

Register a callback to be called with the Symfony message instance.

Parameters

  • $callback callable