Skip to content

Commit

Permalink
Move up message сustomization callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-- committed Feb 2, 2018
1 parent aad6089 commit 0cd8899
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Mail/Mailer.php
Expand Up @@ -225,13 +225,13 @@ public function send($view, array $data = [], $callback = null)

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

call_user_func($callback, $message);

// 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.
$this->addContent($message, $view, $plain, $raw, $data);

call_user_func($callback, $message);

// If a global "to" address has been set, we will set that address on the mail
// message. This is primarily useful during local development in which each
// message should be delivered into a single mail address for inspection.
Expand Down

3 comments on commit 0cd8899

@hackel
Copy link
Contributor

@hackel hackel commented on 0cd8899 Nov 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any explanation for this undocumented, breaking change? It prevents modifying the message body within the withSwiftMessage callback.

@trunda
Copy link

@trunda trunda commented on 0cd8899 Jan 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hackel yea! exatcly!

@StratusBase
Copy link

@StratusBase StratusBase commented on 0cd8899 Feb 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alexander-- This change is causing this issue (#29847)... Please fix or at least explain why this breaking change was made...

Please sign in to comment.