Skip to content

Commit

Permalink
Pass queue from Mailable to SendQueuedMailable job (#47612)
Browse files Browse the repository at this point in the history
* Pass queue from Mailable to SendQueuedMailable job

Fixes issue where the unserialized job has the wrong queue.

* Pass connection from Mailable to SendQueuedMailable job

* Fix property mismatches in SendQueuedMailable

* order

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
Tarpsvo and taylorotwell committed Jun 30, 2023
1 parent 04e4c1b commit a88e2d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Illuminate/Mail/SendQueuedMailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ class SendQueuedMailable
public function __construct(MailableContract $mailable)
{
$this->mailable = $mailable;
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
$this->maxExceptions = property_exists($mailable, 'maxExceptions') ? $mailable->maxExceptions : null;

$this->afterCommit = property_exists($mailable, 'afterCommit') ? $mailable->afterCommit : null;
$this->connection = property_exists($mailable, 'connection') ? $mailable->connection : null;
$this->maxExceptions = property_exists($mailable, 'maxExceptions') ? $mailable->maxExceptions : null;
$this->queue = property_exists($mailable, 'queue') ? $mailable->queue : null;
$this->shouldBeEncrypted = $mailable instanceof ShouldBeEncrypted;
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
}

/**
Expand Down

0 comments on commit a88e2d3

Please sign in to comment.