Skip to content

Commit

Permalink
Update Mailer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Jul 10, 2024
1 parent e4788ce commit 6ea3bcb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Illuminate/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,21 +303,15 @@ public function send($view, array $data = [], $callback = null)

$data['mailer'] = $this->name;

// First we need to parse the view, which could either be a string or an array
// containing both an HTML and plain text versions of the view which should
// be used when sending an e-mail. We will extract both of them out here.
// Once we have retrieved the view content for the e-mail we will set the body
// of this message using the HTML type, which will provide a simple wrapper
// to creating view based emails that are able to receive arrays of data.
[$view, $plain, $raw] = $this->parseView($view);

$data['message'] = $message = $this->createMessage();

// Next we need to generate the view content, allowing pass-through callbacks
// following content generation to utilise said content in header generation.
// For example Symfony's DKIM signing which requires html and plain content.
$this->addContent($message, $view, $plain, $raw, $data);

// Once we have retrieved the view content for the e-mail we will set the body
// of this message using the HTML type, which will provide a simple wrapper
// to creating view based emails that are able to receive arrays of data.
if (! is_null($callback)) {
$callback($message);
}
Expand Down

0 comments on commit 6ea3bcb

Please sign in to comment.