October\Rain\Mail\Mailable

Overview

Generic mailable class.

Extends
  • Illuminate\Mail\Mailable
Implements
  • Illuminate\Contracts\Support\Renderable
  • Illuminate\Contracts\Mail\Mailable

Public Properties

public string $siteContext

siteContext is the active site for this mail message.

public string $forceMailer

forceMailer forces the mailer to use.

public string|null $connection

The name of the connection the job should be sent to.

public string|null $queue

The name of the queue the job should be sent to.

public string|null $chainConnection

The name of the connection the chain should be sent to.

public string|null $chainQueue

The name of the queue the chain should be sent to.

public array|null $chainCatchCallbacks

The callbacks to be executed on chain failure.

public DateTimeInterface|\DateInterval|array|int|null $delay

The number of seconds before the job should be made available.

public bool|null $afterCommit

Indicates whether the job should be dispatched after all database transactions have committed.

public array $middleware

The middleware the job should be dispatched through.

public array $chained

The jobs that should run if this job is successful.

Show inherited public properties

Inherited Public Properties

  • $locale - The locale of the message. (defined in Illuminate\Mail\Mailable)
  • $from - The person the message is from. (defined in Illuminate\Mail\Mailable)
  • $to - The "to" recipients of the message. (defined in Illuminate\Mail\Mailable)
  • $cc - The "cc" recipients of the message. (defined in Illuminate\Mail\Mailable)
  • $bcc - The "bcc" recipients of the message. (defined in Illuminate\Mail\Mailable)
  • $replyTo - The "reply to" recipients of the message. (defined in Illuminate\Mail\Mailable)
  • $subject - The subject of the message. (defined in Illuminate\Mail\Mailable)
  • $markdown - The Markdown template for the message (if applicable). (defined in Illuminate\Mail\Mailable)
  • $view - The view to use for the message. (defined in Illuminate\Mail\Mailable)
  • $textView - The plain text view to use for the message. (defined in Illuminate\Mail\Mailable)
  • $viewData - The view data for the message. (defined in Illuminate\Mail\Mailable)
  • $attachments - The attachments for the message. (defined in Illuminate\Mail\Mailable)
  • $rawAttachments - The raw attachments for the message. (defined in Illuminate\Mail\Mailable)
  • $diskAttachments - The attachments from a storage disk. (defined in Illuminate\Mail\Mailable)
  • $callbacks - The callbacks for the message. (defined in Illuminate\Mail\Mailable)
  • $theme - The name of the theme that should be used when formatting the message. (defined in Illuminate\Mail\Mailable)
  • $mailer - The name of the mailer that should send the message. (defined in Illuminate\Mail\Mailable)
  • $viewDataCallback - The callback that should be invoked while building the view data. (defined in Illuminate\Mail\Mailable)

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties

  • $html - The HTML to use for the message. (defined in Illuminate\Mail\Mailable)
  • $tags - The tags for the message. (defined in Illuminate\Mail\Mailable)
  • $metadata - The metadata for the message. (defined in Illuminate\Mail\Mailable)
  • $assertionableRenderStrings - The rendered mailable views for testing / assertions. (defined in Illuminate\Mail\Mailable)
  • $macros - The registered string macros. (defined in Illuminate\Mail\Mailable)

Public Methods

public __serialize()

public __serialize(): array 

Prepare the instance values for serialization.

public __unserialize()

public __unserialize(array $values): void 

Restore the model after serialization.

public afterCommit()

public afterCommit(): $this 

Indicate that the job should be dispatched after all database transactions have committed.

public allOnConnection()

public allOnConnection(string|null $connection): $this 

Set the desired connection for the chain.

public allOnQueue()

public allOnQueue(string|null $queue): $this 

Set the desired queue for the chain.

public appendToChain()

public appendToChain(mixed $job): $this 

Append a job to the end of the current chain.

public beforeCommit()

public beforeCommit(): $this 

Indicate that the job should not wait until database transactions have been committed before dispatching.

public build()

public build(): $this 

Build the message.

public buildViewData()

public buildViewData(): array 

Build the view data for the message.

public chain()

public chain(array $chain): $this 

Set the jobs that should run if this job is successful.

public delay()

public delay(DateTimeInterface|\DateInterval|array|int|null $delay): $this 

Set the desired delay in seconds for the job.

public dispatchNextJobInChain()

public dispatchNextJobInChain(): void 

Dispatch the next job on the chain.

public forceMailer()

public forceMailer(string $mailer): $this 

forceMailer forces sending using a different mail driver, useful if lazy loading the mail driver configuration for multisite.

public invokeChainCatchCallbacks()

public invokeChainCatchCallbacks(Throwable $e): void 

Invoke all of the chain's failed job callbacks.

public mailer()

public mailer(string $mailer): $this 

mailer sets the name of the mailer that should send the message.

public onConnection()

public onConnection(string|null $connection): $this 

Set the desired connection for the job.

public onQueue()

public onQueue(string|null $queue): $this 

Set the desired queue for the job.

public prependToChain()

public prependToChain(mixed $job): $this 

Prepend a job to the current chain so that it is run after the currently running job.

public restoreModel()

public restoreModel(
    Illuminate\Contracts\Database\ModelIdentifier $value
): Illuminate\Database\Eloquent\Model 

Restore the model from the model identifier instance.

public siteContext()

public siteContext(string $siteId): $this 

siteContext sets the site context of the message.

public through()

public through(array|object $middleware): $this 

Specify the middleware the job should be dispatched through.

public withLocale()

public withLocale(string $locale, Closure $callback): mixed 

withLocale acts as a hook to also apply the site context

public withSerializedData()

public withSerializedData(array $data): $this 

Set serialized view data for the message.

Show inherited public methods

Inherited Public Methods

  • __call() - Dynamically bind parameters to the message. (defined in Illuminate\Mail\Mailable)
  • __callStatic() - Dynamically handle calls to the class. (defined in Illuminate\Mail\Mailable)
  • assertDontSeeInHtml() - Assert that the given text is not present in the HTML email body. (defined in Illuminate\Mail\Mailable)
  • assertDontSeeInText() - Assert that the given text is not present in the plain-text email body. (defined in Illuminate\Mail\Mailable)
  • assertFrom() - Assert that the mailable is from the given address. (defined in Illuminate\Mail\Mailable)
  • assertHasAttachedData() - Assert the mailable has the given data as an attachment. (defined in Illuminate\Mail\Mailable)
  • assertHasAttachment() - Assert the mailable has the given attachment. (defined in Illuminate\Mail\Mailable)
  • assertHasAttachmentFromStorage() - Assert the mailable has the given attachment from storage. (defined in Illuminate\Mail\Mailable)
  • assertHasAttachmentFromStorageDisk() - Assert the mailable has the given attachment from a specific storage disk. (defined in Illuminate\Mail\Mailable)
  • assertHasBcc() - Assert that the mailable has the given recipient. (defined in Illuminate\Mail\Mailable)
  • assertHasCc() - Assert that the mailable has the given recipient. (defined in Illuminate\Mail\Mailable)
  • assertHasMetadata() - Assert that the mailable has the given metadata. (defined in Illuminate\Mail\Mailable)
  • assertHasReplyTo() - Assert that the mailable has the given "reply to" address. (defined in Illuminate\Mail\Mailable)
  • assertHasSubject() - Assert that the mailable has the given subject. (defined in Illuminate\Mail\Mailable)
  • assertHasTag() - Assert that the mailable has the given tag. (defined in Illuminate\Mail\Mailable)
  • assertHasTo() - Assert that the mailable has the given recipient. (defined in Illuminate\Mail\Mailable)
  • assertSeeInHtml() - Assert that the given text is present in the HTML email body. (defined in Illuminate\Mail\Mailable)
  • assertSeeInOrderInHtml() - Assert that the given text strings are present in order in the HTML email body. (defined in Illuminate\Mail\Mailable)
  • assertSeeInOrderInText() - Assert that the given text strings are present in order in the plain-text email body. (defined in Illuminate\Mail\Mailable)
  • assertSeeInText() - Assert that the given text is present in the plain-text email body. (defined in Illuminate\Mail\Mailable)
  • assertTo() - Assert that the mailable has the given recipient. (defined in Illuminate\Mail\Mailable)
  • attach() - Attach a file to the message. (defined in Illuminate\Mail\Mailable)
  • attachData() - Attach in-memory data as an attachment. (defined in Illuminate\Mail\Mailable)
  • attachFromStorage() - Attach a file to the message from storage. (defined in Illuminate\Mail\Mailable)
  • attachFromStorageDisk() - Attach a file to the message from storage. (defined in Illuminate\Mail\Mailable)
  • attachMany() - Attach multiple files to the message. (defined in Illuminate\Mail\Mailable)
  • bcc() - Set the recipients of the message. (defined in Illuminate\Mail\Mailable)
  • buildViewDataUsing() - Register a callback to be called while building the view data. (defined in Illuminate\Mail\Mailable)
  • cc() - Set the recipients of the message. (defined in Illuminate\Mail\Mailable)
  • flushMacros() - Flush the existing macros. (defined in Illuminate\Mail\Mailable)
  • from() - Set the sender of the message. (defined in Illuminate\Mail\Mailable)
  • hasAttachedData() - Determine if the mailable has the given data as an attachment. (defined in Illuminate\Mail\Mailable)
  • hasAttachment() - Determine if the mailable has the given attachment. (defined in Illuminate\Mail\Mailable)
  • hasAttachmentFromStorage() - Determine if the mailable has the given attachment from storage. (defined in Illuminate\Mail\Mailable)
  • hasAttachmentFromStorageDisk() - Determine if the mailable has the given attachment from a specific storage disk. (defined in Illuminate\Mail\Mailable)
  • hasBcc() - Determine if the given recipient is set on the mailable. (defined in Illuminate\Mail\Mailable)
  • hasCc() - Determine if the given recipient is set on the mailable. (defined in Illuminate\Mail\Mailable)
  • hasFrom() - Determine if the given recipient is set on the mailable. (defined in Illuminate\Mail\Mailable)
  • hasMacro() - Checks if macro is registered. (defined in Illuminate\Mail\Mailable)
  • hasMetadata() - Determine if the mailable has the given metadata. (defined in Illuminate\Mail\Mailable)
  • hasReplyTo() - Determine if the given replyTo is set on the mailable. (defined in Illuminate\Mail\Mailable)
  • hasSubject() - Determine if the mailable has the given subject. (defined in Illuminate\Mail\Mailable)
  • hasTag() - Determine if the mailable has the given tag. (defined in Illuminate\Mail\Mailable)
  • hasTo() - Determine if the given recipient is set on the mailable. (defined in Illuminate\Mail\Mailable)
  • html() - Set the rendered HTML content for the message. (defined in Illuminate\Mail\Mailable)
  • later() - Deliver the queued message after (n) seconds. (defined in Illuminate\Mail\Mailable)
  • locale() - Set the locale of the message. (defined in Illuminate\Mail\Mailable)
  • macro() - Register a custom macro. (defined in Illuminate\Mail\Mailable)
  • macroCall() - Dynamically handle calls to the class. (defined in Illuminate\Mail\Mailable)
  • markdown() - Set the Markdown template for the message. (defined in Illuminate\Mail\Mailable)
  • metadata() - Add a metadata header to the message when supported by the underlying transport. (defined in Illuminate\Mail\Mailable)
  • mixin() - Mix another object into the class. (defined in Illuminate\Mail\Mailable)
  • priority() - Set the priority of this message. (defined in Illuminate\Mail\Mailable)
  • queue() - Queue the message for sending. (defined in Illuminate\Mail\Mailable)
  • render() - Render the mailable into a view. (defined in Illuminate\Mail\Mailable)
  • replyTo() - Set the "reply to" address of the message. (defined in Illuminate\Mail\Mailable)
  • send() - Send the message using the given mailer. (defined in Illuminate\Mail\Mailable)
  • subject() - Set the subject of the message. (defined in Illuminate\Mail\Mailable)
  • tag() - Add a tag header to the message when supported by the underlying transport. (defined in Illuminate\Mail\Mailable)
  • text() - Set the plain text view for the message. (defined in Illuminate\Mail\Mailable)
  • to() - Set the recipients of the message. (defined in Illuminate\Mail\Mailable)
  • unless() - Apply the callback if the given "value" is (or resolves to) falsy. (defined in Illuminate\Mail\Mailable)
  • view() - Set the view and view data for the message. (defined in Illuminate\Mail\Mailable)
  • when() - Apply the callback if the given "value" is (or resolves to) truthy. (defined in Illuminate\Mail\Mailable)
  • with() - Set the view data for the message. (defined in Illuminate\Mail\Mailable)
  • withSymfonyMessage() - Register a callback to be called with the Symfony message instance. (defined in Illuminate\Mail\Mailable)

Protected Methods

protected buildSubject()

protected buildSubject(Illuminate\Mail\Message $message): $this 

Set the subject for the message.

protected getPropertyValue()

protected getPropertyValue(ReflectionProperty $property): mixed 

Get the property value for the given property.

protected getQueryForModelRestoration()

protected getQueryForModelRestoration(
    Illuminate\Database\Eloquent\Model $model,
    array|int $ids
): Illuminate\Database\Eloquent\Builder 

Get the query for model restoration.

protected getRestoredPropertyValue()

protected getRestoredPropertyValue(mixed $value): mixed 

Get the restored property value after deserialization.

protected getSerializedPropertyValue()

protected getSerializedPropertyValue(mixed $value): mixed 

Get the property value prepared for serialization.

protected restoreCollection()

protected restoreCollection(
    Illuminate\Contracts\Database\ModelIdentifier $value
): Illuminate\Database\Eloquent\Collection 

Restore a queueable collection instance.

protected serializeJob()

protected serializeJob(mixed $job): string 

Serialize a job for queuing.

Show inherited protected methods

Inherited Protected Methods

  • addressesToArray() - Convert the given recipient arguments to an array. (defined in Illuminate\Mail\Mailable)
  • buildAttachments() - Add all of the attachments to the message. (defined in Illuminate\Mail\Mailable)
  • buildDiskAttachments() - Add all of the disk attachments to the message. (defined in Illuminate\Mail\Mailable)
  • buildFrom() - Add the sender to the message. (defined in Illuminate\Mail\Mailable)
  • buildMarkdownText() - Build the text view for a Markdown message. (defined in Illuminate\Mail\Mailable)
  • buildMarkdownView() - Build the Markdown view for the message. (defined in Illuminate\Mail\Mailable)
  • buildMetadata() - Add all defined metadata to the message. (defined in Illuminate\Mail\Mailable)
  • buildRecipients() - Add all of the recipients to the message. (defined in Illuminate\Mail\Mailable)
  • buildTags() - Add all defined tags to the message. (defined in Illuminate\Mail\Mailable)
  • buildView() - Build the view for the message. (defined in Illuminate\Mail\Mailable)
  • forwardCallTo() - Forward a method call to the given object. (defined in Illuminate\Mail\Mailable)
  • forwardDecoratedCallTo() - Forward a method call to the given object, returning $this if the forwarded call returned itself. (defined in Illuminate\Mail\Mailable)
  • hasRecipient() - Determine if the given recipient is set on the mailable. (defined in Illuminate\Mail\Mailable)
  • newQueuedJob() - Make the queued mailable job instance. (defined in Illuminate\Mail\Mailable)
  • normalizeRecipient() - Convert the given recipient into an object. (defined in Illuminate\Mail\Mailable)
  • renderForAssertions() - Render the HTML and plain-text version of the mailable into views for assertions. (defined in Illuminate\Mail\Mailable)
  • runCallbacks() - Run the callbacks for the message. (defined in Illuminate\Mail\Mailable)
  • setAddress() - Set the recipients of the message. (defined in Illuminate\Mail\Mailable)
  • throwBadMethodCallException() - Throw a bad method call exception for the given method. (defined in Illuminate\Mail\Mailable)