Skip to content

Commit e10efa6

Browse files
Pass $maxExceptions from mailable to underlying job when queuing (#44903)
* Pass `$maxExceptions` from mailable to underlying job when queuing * Update SendQueuedMailable.php Co-authored-by: Taylor Otwell <[email protected]>
1 parent 937498b commit e10efa6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Illuminate/Mail/SendQueuedMailable.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ class SendQueuedMailable
3333
*/
3434
public $timeout;
3535

36+
/**
37+
* The maximum number of unhandled exceptions to allow before failing.
38+
*
39+
* @return int|null
40+
*/
41+
public $maxExceptions;
42+
3643
/**
3744
* Indicates if the job should be encrypted.
3845
*
@@ -51,6 +58,7 @@ public function __construct(MailableContract $mailable)
5158
$this->mailable = $mailable;
5259
$this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null;
5360
$this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null;
61+
$this->maxExceptions = property_exists($mailable, 'maxExceptions') ? $mailable->maxExceptions : null;
5462
$this->afterCommit = property_exists($mailable, 'afterCommit') ? $mailable->afterCommit : null;
5563
$this->shouldBeEncrypted = $mailable instanceof ShouldBeEncrypted;
5664
}

0 commit comments

Comments
 (0)