October\Rain\Mail\Mailer
Overview
Mailer class for sending mail.
Extends
- Illuminate\Mail\Mailer
Implements
- Illuminate\Contracts\Mail\MailQueue
- Illuminate\Contracts\Mail\Mailer
Protected Properties
protected string $pretendingOriginal
pretendingOriginal contains the original driver before pretending.
protected array $emitterSingleEventCollection
emitterSingleEventCollection of events to be fired once only
protected array $emitterEventCollection
emitterEventCollection of all registered events
protected array $emitterEventSorted
emitterEventSorted collection
Show inherited protected properties
Inherited Protected Properties
- $name - The name that is configured for the mailer. (defined in Illuminate\Mail\Mailer)
- $views - The view factory instance. (defined in Illuminate\Mail\Mailer)
- $transport - The Symfony Transport instance. (defined in Illuminate\Mail\Mailer)
- $events - The event dispatcher instance. (defined in Illuminate\Mail\Mailer)
- $from - The global from address and name. (defined in Illuminate\Mail\Mailer)
- $replyTo - The global reply-to address and name. (defined in Illuminate\Mail\Mailer)
- $returnPath - The global return path address. (defined in Illuminate\Mail\Mailer)
- $to - The global to address and name. (defined in Illuminate\Mail\Mailer)
- $queue - The queue factory implementation. (defined in Illuminate\Mail\Mailer)
- $macros - The registered string macros. (defined in Illuminate\Mail\Mailer)
Public Methods
public bindEvent()
public bindEvent($event, $callback, $priority = 0): void
bindEvent creates a new event binding
public bindEventOnce()
public bindEventOnce($event, $callback, $priority = 0): void
bindEventOnce creates a new event binding that fires once only
public fireEvent()
public fireEvent(
string $event,
array $params = [],
boolean $halt = false
): array
fireEvent and call the listeners
public later()
public later(
int $delay,
string|array $view,
array $data = null,
Closure|string $callback = null,
string|null $queue = null
): mixed
later queues a new e-mail message for sending after (n) seconds.
public laterOn()
public laterOn(
string $queue,
int $delay,
string|array $view,
array $data = null,
Closure|string $callback = null
): mixed
laterOn queues a new e-mail message for sending after (n) seconds on the given queue.
public pretend()
public pretend(bool $value = true): void
pretend tells the mailer to not really send messages.
public queue()
public queue(
string|array $view,
array $data = null,
Closure|string $callback = null,
string|null $queue = null
): mixed
queue a new e-mail message for sending.
public queueOn()
public queueOn(
string $queue,
string|array $view,
array $data = null,
Closure|string $callback = null
): mixed
queueOn queues a new e-mail message for sending on the given queue.
public raw()
public raw(string $text, mixed $callback): int
raw sends a new message when only a raw text part.
public rawTo()
public rawTo(
array $recipients,
string $view,
mixed $callback = null,
array $options = []
): int
rawTo helper for raw() method, send a new message when only a raw text part.
public send()
public send(
string|array $view,
array $data = [],
Closure|string $callback = null
): mixed
send a new message using a view.
public sendTo()
public sendTo(
array $recipients,
string|array $view,
array $data = [],
mixed $callback = null,
array $options = []
): void
sendTo is a helper for send() method, the first argument can take a single email or an array of recipients where the key is the address and the value is the name.
public unbindEvent()
public unbindEvent($event = null): void
unbindEvent destroys an event binding
Inherited Public Methods
- __call() - Dynamically handle calls to the class. (defined in Illuminate\Mail\Mailer)
- __callStatic() - Dynamically handle calls to the class. (defined in Illuminate\Mail\Mailer)
- __construct() - Create a new Mailer instance. (defined in Illuminate\Mail\Mailer)
- alwaysFrom() - Set the global from address and name. (defined in Illuminate\Mail\Mailer)
- alwaysReplyTo() - Set the global reply-to address and name. (defined in Illuminate\Mail\Mailer)
- alwaysReturnPath() - Set the global return path address. (defined in Illuminate\Mail\Mailer)
- alwaysTo() - Set the global to address and name. (defined in Illuminate\Mail\Mailer)
- bcc() - Begin the process of mailing a mailable class instance. (defined in Illuminate\Mail\Mailer)
- cc() - Begin the process of mailing a mailable class instance. (defined in Illuminate\Mail\Mailer)
- flushMacros() - Flush the existing macros. (defined in Illuminate\Mail\Mailer)
- getSymfonyTransport() - Get the Symfony Transport instance. (defined in Illuminate\Mail\Mailer)
- getViewFactory() - Get the view factory instance. (defined in Illuminate\Mail\Mailer)
- hasMacro() - Checks if macro is registered. (defined in Illuminate\Mail\Mailer)
- html() - Send a new message with only an HTML part. (defined in Illuminate\Mail\Mailer)
- macro() - Register a custom macro. (defined in Illuminate\Mail\Mailer)
- mixin() - Mix another object into the class. (defined in Illuminate\Mail\Mailer)
- onQueue() - Queue a new mail message for sending on the given queue. (defined in Illuminate\Mail\Mailer)
- plain() - Send a new message with only a plain part. (defined in Illuminate\Mail\Mailer)
- render() - Render the given message as a view. (defined in Illuminate\Mail\Mailer)
- sendNow() - Send a new message synchronously using a view. (defined in Illuminate\Mail\Mailer)
- setQueue() - Set the queue manager instance. (defined in Illuminate\Mail\Mailer)
- setSymfonyTransport() - Set the Symfony Transport instance. (defined in Illuminate\Mail\Mailer)
- to() - Begin the process of mailing a mailable class instance. (defined in Illuminate\Mail\Mailer)
Protected Methods
protected addContent()
protected addContent(
Illuminate\Mail\Message $message,
string $view,
string $plain,
string $raw,
array $data
): void
addContent to a given message.
protected addContentRaw()
protected addContentRaw(
Illuminate\Mail\Message $message,
string $html,
string $text
): void
addContentRaw to a given message.
protected buildQueueMailable()
protected buildQueueMailable(
mixed $callback,
$data,
$callback,
$queue
): mixed
buildQueueMailable for a queued email job.
protected emitterEventSortEvents()
protected emitterEventSortEvents($eventName, $combined = []): array
emitterEventSortEvents sorts the listeners for a given event by priority
protected processRecipients()
protected processRecipients(mixed $recipients): array
processRecipients object, which can look like the following:
- (string) admin@domain.tld
- (object) ['email' => 'admin@domain.tld', 'name' => 'Adam Person']
- (array) ['admin@domain.tld' => 'Adam Person', ...]
- (array) [ (object|array) ['email' => 'admin@domain.tld', 'name' => 'Adam Person'], [...] ]
Show inherited protected methods
Inherited Protected Methods
- createMessage() - Create a new message instance. (defined in Illuminate\Mail\Mailer)
- dispatchSentEvent() - Dispatch the message sent event. (defined in Illuminate\Mail\Mailer)
- parseView() - Parse the given view name or array. (defined in Illuminate\Mail\Mailer)
- renderView() - Render the given view. (defined in Illuminate\Mail\Mailer)
- replaceEmbeddedAttachments() - Replace the embedded image attachments with raw, inline image data for browser rendering. (defined in Illuminate\Mail\Mailer)
- sendMailable() - Send the given mailable. (defined in Illuminate\Mail\Mailer)
- sendSymfonyMessage() - Send a Symfony Email instance. (defined in Illuminate\Mail\Mailer)
- setGlobalToAndRemoveCcAndBcc() - Set the global "to" address on the given message. (defined in Illuminate\Mail\Mailer)
- shouldSendMessage() - Determines if the email can be sent. (defined in Illuminate\Mail\Mailer)