Documentation

Mailer
in package

Table of Contents

Properties

$swift  : Swift_Mailer
The Swift Mailer instance.
$assetsPath  : string
The assets directory.
$config  : Config
$from  : mixed
Global "From" address
$layoutsDir  : string
The layouts directory.
$logger  : Logger
$partialsDir  : string
The partials directory.
$replyTo  : mixed
Global "Reply To" address
$to  : mixed
Global "To" address
$viewsDir  : string
The views directory.

Methods

__construct()  : mixed
Mailer constructor.
bcc()  : PendingMail
Begin the process of mailing a mailable class instance.
cc()  : PendingMail
Begin the process of mailing a mailable class instance.
send()  : mixed
Send a new message using a view.
to()  : PendingMail
Begin the process of mailing a mailable class instance.
addContent()  : mixed
Add the content to a given message.
createMessage()  : Message
Create a new message instance.
parseView()  : array<string|int, mixed>
Parse the given view name or array.
renderView()  : string
Render the given view.
sendMailable()  : mixed
Send the given mailable.
setGlobalToAndRemoveCcAndBcc()  : void
Set the global "to" address on the given message.

Properties

$swift

The Swift Mailer instance.

protected Swift_Mailer $swift

$assetsPath

The assets directory.

private string $assetsPath

$from

Global "From" address

private mixed $from

$layoutsDir

The layouts directory.

private string $layoutsDir

$partialsDir

The partials directory.

private string $partialsDir

$replyTo

Global "Reply To" address

private mixed $replyTo

$to

Global "To" address

private mixed $to

$viewsDir

The views directory.

private string $viewsDir

Methods

__construct()

Mailer constructor.

public __construct(Di $di) : mixed
Parameters
$di : Di

bcc()

Begin the process of mailing a mailable class instance.

public bcc(mixed $address) : PendingMail
Parameters
$address : mixed
Return values
PendingMail

cc()

Begin the process of mailing a mailable class instance.

public cc(mixed $address) : PendingMail
Parameters
$address : mixed
Return values
PendingMail

send()

Send a new message using a view.

public send(string|array<string|int, mixed> $view[, array<string|int, mixed> $data = [] ][, null|string $theme = null ][, Closure|string $callback = null ]) : mixed
Parameters
$view : string|array<string|int, mixed>
$data : array<string|int, mixed> = []
$theme : null|string = null
$callback : Closure|string = null

to()

Begin the process of mailing a mailable class instance.

public to(mixed $address) : PendingMail
Parameters
$address : mixed
Return values
PendingMail

addContent()

Add the content to a given message.

protected addContent(Message $message, string $view, string $plain, string $raw, array<string|int, mixed> $data, string $theme) : mixed
Parameters
$message : Message
$view : string
$plain : string
$raw : string
$data : array<string|int, mixed>
$theme : string

createMessage()

Create a new message instance.

protected createMessage() : Message
Return values
Message

parseView()

Parse the given view name or array.

protected parseView(string|array<string|int, mixed> $view) : array<string|int, mixed>
Parameters
$view : string|array<string|int, mixed>
Tags
throws
InvalidArgumentException
Return values
array<string|int, mixed>

renderView()

Render the given view.

protected renderView(string $view, array<string|int, mixed> $data, string $theme) : string
Parameters
$view : string
$data : array<string|int, mixed>
$theme : string
Return values
string

sendMailable()

Send the given mailable.

protected sendMailable(Mailable $mailable) : mixed
Parameters
$mailable : Mailable

setGlobalToAndRemoveCcAndBcc()

Set the global "to" address on the given message.

protected setGlobalToAndRemoveCcAndBcc(Message $message) : void
Parameters
$message : Message

        
On this page

Search results