Skip to content

Commit

Permalink
Merge pull request #30999 from themsaid/pr/13814
Browse files Browse the repository at this point in the history
[6.x] Deprecate sendNow and remove unneeded check
  • Loading branch information
taylorotwell committed Jan 2, 2020
2 parents 50e43a5 + 6b86ec5 commit 0b748bc
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/Illuminate/Mail/PendingMail.php
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Contracts\Mail\Mailable as MailableContract;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Translation\HasLocalePreference;

class PendingMail
Expand Down Expand Up @@ -120,10 +119,6 @@ public function bcc($users)
*/
public function send(MailableContract $mailable)
{
if ($mailable instanceof ShouldQueue) {
return $this->queue($mailable);
}

return $this->mailer->send($this->fill($mailable));
}

Expand All @@ -132,6 +127,7 @@ public function send(MailableContract $mailable)
*
* @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
* @deprecated Use send() instead.
*/
public function sendNow(MailableContract $mailable)
{
Expand All @@ -146,13 +142,7 @@ public function sendNow(MailableContract $mailable)
*/
public function queue(MailableContract $mailable)
{
$mailable = $this->fill($mailable);

if (isset($mailable->delay)) {
return $this->mailer->later($mailable->delay, $mailable);
}

return $this->mailer->queue($mailable);
return $this->mailer->queue($this->fill($mailable));
}

/**
Expand Down

0 comments on commit 0b748bc

Please sign in to comment.