From 2d5514cedb88a0b280c5b8ec5179ec86b1bfda57 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Sat, 25 Feb 2017 02:31:18 +0200 Subject: [PATCH] [5.4] Added ability to granularly set mailable tries & timeout (#18103) * Added ability to granularly set the mailable tries and timeout properties * add properties to the SendQueuedMailable Job --- src/Illuminate/Mail/SendQueuedMailable.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Illuminate/Mail/SendQueuedMailable.php b/src/Illuminate/Mail/SendQueuedMailable.php index 9e12cddc0e77..f3e5f2c74693 100644 --- a/src/Illuminate/Mail/SendQueuedMailable.php +++ b/src/Illuminate/Mail/SendQueuedMailable.php @@ -14,6 +14,20 @@ class SendQueuedMailable */ public $mailable; + /** + * The number of times the job may be attempted. + * + * @var int + */ + public $tries; + + /** + * The number of seconds the job can run before timing out. + * + * @var int + */ + public $timeout; + /** * Create a new job instance. * @@ -23,6 +37,8 @@ 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; } /**