Skip to content

Commit

Permalink
Merge pull request #12 from zupolgec/fix-queueable-mailables
Browse files Browse the repository at this point in the history
Not adding headers to queueable mailables
  • Loading branch information
mpociot authored May 11, 2021
2 parents 12ac15b + 086ed2e commit bca9d97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace BeyondCode\HeloLaravel;

use Illuminate\Contracts\Mail\Mailable as MailableContract;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailer as LaravelMailer;
use Illuminate\Support\Facades\View;
Expand All @@ -15,10 +15,10 @@ class Mailer extends LaravelMailer implements MailerContract
{
public function send($view, array $data = [], $callback = null)
{
if ($view instanceof MailableContract) {
if ($view instanceof Mailable
&& ! $view instanceof ShouldQueue
) {
$this->applyDebugHeaders($view);

return $this->sendMailable($view);
}

parent::send($view, $data, $callback);
Expand Down

0 comments on commit bca9d97

Please sign in to comment.