After update from laravel 5.5 to laravel 5.8 swiftmailers setBody method doesn
t make any changes to body #1646
Description
Made a copy of this one issue.
PR #22995 to fix #22982 cause this problem...
Any ideas about ways to resolve such problem and save standart swiftmailers methods work?
Maybe it can be made with some flags which will say to laravel core when to make call_user_func before or after addContent call ?
==========================================================================
- Laravel Version: 5.8.17
- PHP Version: 7.3.5
Description:
After update laravel version from 5.5 to 5.8 when using swiftmailer raw method, mail sending starts to give error quoted_printable_encode() expects parameter 1 to be string, array given
If you provide some raw string data as first parameter - mail will be sent, BUT callback function will not make any changes to body with setBody method...
Steps To Reproduce:
Try to send e-mail with raw method using swiftmailer:
`Mail::raw([], function ($message)
{
$message->to('some@email.test');
$message->from('from@my.mail', 'MyName');
$message->subject('Test email send');
$message->setBody('Some cute html body to send', 'text/html');
});`
How To Solve Problem:
In new versions of laravel 5.6+ had been moved call of call_user_func in /vendor/laravel/framework/src/Illuminate/Mail/Mailer.php in send($view, array $data = [], $callback = null) method...
If you move call_user_func back as in previous laravel versions - problem will be solved and all will start work well.
Thats it...