class Mailer implements Mailer, MailQueue (View source)

Methods

void
__construct( Factory $views, Swift_Mailer $swift, Dispatcher $events = null)

Create a new Mailer instance.

void
alwaysFrom( string $address, string|null $name = null)

Set the global from address and name.

void
alwaysTo( string $address, string|null $name = null)

Set the global to address and name.

int
raw( string $text, Closure|string $callback)

Send a new message when only a raw text part.

void
plain( string $view, array $data, mixed $callback)

Send a new message when only a plain part.

void
send( string|array $view, array $data, Closure|string $callback)

Send a new message using a view.

mixed
queue( string|array $view, array $data, Closure|string $callback, string $queue = null)

Queue a new e-mail message for sending.

mixed
onQueue( string $queue, string|array $view, array $data, Closure|string $callback)

Queue a new e-mail message for sending on the given queue.

mixed
queueOn( string $queue, string|array $view, array $data, Closure|string $callback)

Queue a new e-mail message for sending on the given queue.

mixed
later( int $delay, string|array $view, array $data, Closure|string $callback, string $queue = null)

Queue a new e-mail message for sending after (n) seconds.

mixed
laterOn( string $queue, int $delay, string|array $view, array $data, Closure|string $callback)

Queue a new e-mail message for sending after (n) seconds on the given queue.

void
handleQueuedMessage( Job $job, array $data)

Handle a queued e-mail message job.

getViewFactory()

Get the view factory instance.

Swift_Mailer
getSwiftMailer()

Get the Swift Mailer instance.

array
failures()

Get the array of failed recipients.

void
setSwiftMailer( Swift_Mailer $swift)

Set the Swift Mailer instance.

$this
setQueue( Queue $queue)

Set the queue manager instance.

void
setContainer( Container $container)

Set the IoC container instance.

Details

at line line 85
void __construct( Factory $views, Swift_Mailer $swift, Dispatcher $events = null)

Create a new Mailer instance.

Parameters

Factory $views
Swift_Mailer $swift
Dispatcher $events

Return Value

void

at line line 99
void alwaysFrom( string $address, string|null $name = null)

Set the global from address and name.

Parameters

string $address
string|null $name

Return Value

void

at line line 111
void alwaysTo( string $address, string|null $name = null)

Set the global to address and name.

Parameters

string $address
string|null $name

Return Value

void

at line line 123
int raw( string $text, Closure|string $callback)

Send a new message when only a raw text part.

Parameters

string $text
Closure|string $callback

Return Value

int

at line line 136
void plain( string $view, array $data, mixed $callback)

Send a new message when only a plain part.

Parameters

string $view
array $data
mixed $callback

Return Value

void

at line line 149
void send( string|array $view, array $data, Closure|string $callback)

Send a new message using a view.

Parameters

string|array $view
array $data
Closure|string $callback

Return Value

void

at line line 185
mixed queue( string|array $view, array $data, Closure|string $callback, string $queue = null)

Queue a new e-mail message for sending.

Parameters

string|array $view
array $data
Closure|string $callback
string $queue

Return Value

mixed

at line line 201
mixed onQueue( string $queue, string|array $view, array $data, Closure|string $callback)

Queue a new e-mail message for sending on the given queue.

Parameters

string $queue
string|array $view
array $data
Closure|string $callback

Return Value

mixed

at line line 217
mixed queueOn( string $queue, string|array $view, array $data, Closure|string $callback)

Queue a new e-mail message for sending on the given queue.

This method didn't match rest of framework's "onQueue" phrasing. Added "onQueue".

Parameters

string $queue
string|array $view
array $data
Closure|string $callback

Return Value

mixed

at line line 232
mixed later( int $delay, string|array $view, array $data, Closure|string $callback, string $queue = null)

Queue a new e-mail message for sending after (n) seconds.

Parameters

int $delay
string|array $view
array $data
Closure|string $callback
string $queue

Return Value

mixed

at line line 249
mixed laterOn( string $queue, int $delay, string|array $view, array $data, Closure|string $callback)

Queue a new e-mail message for sending after (n) seconds on the given queue.

Parameters

string $queue
int $delay
string|array $view
array $data
Closure|string $callback

Return Value

mixed

at line line 276
void handleQueuedMessage( Job $job, array $data)

Handle a queued e-mail message job.

Parameters

Job $job
array $data

Return Value

void

at line line 447
Factory getViewFactory()

Get the view factory instance.

Return Value

Factory

at line line 457
Swift_Mailer getSwiftMailer()

Get the Swift Mailer instance.

Return Value

Swift_Mailer

at line line 467
array failures()

Get the array of failed recipients.

Return Value

array

at line line 478
void setSwiftMailer( Swift_Mailer $swift)

Set the Swift Mailer instance.

Parameters

Swift_Mailer $swift

Return Value

void

at line line 489
$this setQueue( Queue $queue)

Set the queue manager instance.

Parameters

Queue $queue

Return Value

$this

at line line 502
void setContainer( Container $container)

Set the IoC container instance.

Parameters

Container $container

Return Value

void