Skip to content

Commit a88e2d3

Browse files
Pass queue from Mailable to SendQueuedMailable job (#47612)
* 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 <[email protected]>
1 parent 04e4c1b commit a88e2d3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Illuminate/Mail/SendQueuedMailable.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@ class SendQueuedMailable
5656
public function __construct(MailableContract $mailable)
5757
{
5858
$this->mailable = $mailable;
59-
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
60-
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
61-
$this->maxExceptions = property_exists($mailable, 'maxExceptions') ? $mailable->maxExceptions : null;
59+
6260
$this->afterCommit = property_exists($mailable, 'afterCommit') ? $mailable->afterCommit : null;
61+
$this->connection = property_exists($mailable, 'connection') ? $mailable->connection : null;
62+
$this->maxExceptions = property_exists($mailable, 'maxExceptions') ? $mailable->maxExceptions : null;
63+
$this->queue = property_exists($mailable, 'queue') ? $mailable->queue : null;
6364
$this->shouldBeEncrypted = $mailable instanceof ShouldBeEncrypted;
65+
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
66+
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
6467
}
6568

6669
/**

0 commit comments

Comments
 (0)