8000 [9.x] Update from Swift Mailer to Symfony Mailer by Jubeki · Pull Request #7306 · laravel/docs · GitHub
[go: up one dir, main page]

Skip to content

[9.x] Update from Swift Mailer to Symfony Mailer #7306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Typehint to withSymfonyMessage
  • Loading branch information
Jubeki committed Sep 14, 2021
commit 3372d569f78b44518211676b3102590f57809f01
4 changes: 3 additions & 1 deletion mail.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ If you already have a raw image data string you wish to embed into an email temp

The `withSymfonyMessage` method of the `Mailable` base class allows you to register a closure which will be invoked with the Symfony Message instance before sending the message. This gives you an opportunity to deeply customize the message before it is delivered:

use Illuminate\Mail\Message;

/**
* Build the message.
*
Expand All @@ -436,7 +438,7 @@ The `withSymfonyMessage` method of the `Mailable` base class allows you to regis
{
$this->view('emails.orders.shipped');

$this->withSymfonyMessage(function ($message) {
$this->withSymfonyMessage(function (Message $message) {
$message->getHeaders()->addTextHeader(
'Custom-Header', 'Header Value'
);
Expand Down
0