Mailer
Implements
Uses
Properties
$name string
The name that is configured for the mailer.
$swift Swift_Mailer
The Swift Mailer instance.
$from array
The global from address and name.
$replyTo array
The global reply-to address and name.
$returnPath array
The global return path address.
$to array
The global to address and name.
$failedRecipients array
Array of failed recipients.
Methods
__construct ( string $name , Factory $views , Swift_Mailer $swift , Dispatcher $events ) : void
Create a new Mailer instance.
Parameters
- $name string
- $views Factory
- $swift Swift_Mailer
- $events Dispatcher |null
alwaysFrom ( $address , $name ) : void
Set the global from address and name.
Parameters
- $address string
- $name string|null
alwaysReplyTo ( $address , $name ) : void
Set the global reply-to address and name.
Parameters
- $address string
- $name string|null
alwaysReturnPath ( $address ) : void
Set the global return path address.
Parameters
- $address string
alwaysTo ( $address , $name ) : void
Set the global to address and name.
Parameters
- $address string
- $name string|null
to ( $users ) : PendingMail
Begin the process of mailing a mailable class instance.
Parameters
- $users mixed
cc ( $users ) : PendingMail
Begin the process of mailing a mailable class instance.
Parameters
- $users mixed
bcc ( $users ) : PendingMail
Begin the process of mailing a mailable class instance.
Parameters
- $users mixed
html ( $html , $callback ) : void
Send a new message with only an HTML part.
Parameters
- $html string
- $callback mixed
raw ( $text , $callback ) : void
Send a new message with only a raw text part.
Parameters
- $text string
- $callback mixed
plain ( $view , array $data , $callback ) : void
Send a new message with only a plain part.
Parameters
- $view string
- $data array
- $callback mixed
render ( $view , array $data ) : string
Render the given message as a view.
Parameters
- $view string|array
- $data array
send ( $view , array $data , $callback ) : void
Send a new message using a view.
Parameters
sendMailable ( Mailable $mailable ) : mixed
Send the given mailable.
Parameters
- $mailable Mailable
parseView ( $view ) : array
Parse the given view name or array.
Parameters
- $view string|array
addContent ( $message , $view , $plain , $raw , $data ) : void
Add the content to a given message.
Parameters
- $message Message
- $view string
- $plain string
- $raw string
- $data array
renderView ( $view , $data ) : string
Render the given view.
Parameters
- $view string
- $data array
setGlobalToAndRemoveCcAndBcc ( $message ) : void
Set the global "to" address on the given message.
Parameters
- $message Message
queue ( $view , $queue ) : mixed
Queue a new e-mail message for sending.
Parameters
- $view Mailable |string|array
- $queue string|null
onQueue ( $queue , $view ) : mixed
Queue a new e-mail message for sending on the given queue.
Parameters
- $queue string
- $view Mailable
queueOn ( $queue , $view ) : mixed
Queue a new e-mail message for sending on the given queue.
Parameters
- $queue string
- $view Mailable
later ( $delay , $view , $queue ) : mixed
Queue a new e-mail message for sending after (n) seconds.
Parameters
- $delay DateTimeInterface |DateInterval |int
- $view Mailable
- $queue string|null
laterOn ( $queue , $delay , $view ) : mixed
Queue a new e-mail message for sending after (n) seconds on the given queue.
Parameters
- $queue string
- $delay DateTimeInterface |DateInterval |int
- $view Mailable
sendSwiftMessage ( $message ) : int|null
Send a Swift Message instance.
Parameters
- $message Swift_Message
shouldSendMessage ( $message , $data ) : bool
Determines if the message can be sent.
Parameters
- $message Swift_Message
- $data array
dispatchSentEvent ( $message , $data ) : void
Dispatch the message sent event.
Parameters
- $message Message
- $data array
forceReconnection ( ) : void
Force the transport to re-connect.
failures ( ) : array
Get the array of failed recipients.
getSwiftMailer ( ) : Swift_Mailer
Get the Swift Mailer instance.
setSwiftMailer ( $swift ) : void
Set the Swift Mailer instance.
Parameters
- $swift Swift_Mailer