When I send a Multipart mail, HTML view renders correctly but when I activate plain text view it doesn't render accents. How could I send accents in plain text mail using Laravel?
Method used to send mail
Mail::send(['html.blade.php', 'text.txt'], $data, $callback);
Sending áéíóú
through a form results in:
HTML
áéíóú
Plain Text
áéíóú
Here's the text view content:
text.blade.php
Information Request
====================================================
{{ $user_message }}
--
{{ $name }}
{{ $email }}
** This mail was sent from mysite.com **
And I'm retrieving information from the controller in this way:
WelcomeController.php
public function contact(ContactFormRequest $request)
{
$data = array(
'name' => $request->get('name'),
'email' => $request->get('email'),
'phone' => $request->get('phone'),
'user_message' => $request->get('message')
);
Log::info('DEBUGGING $data['user_message']);
\Mail::send(['emails.html', 'emails.text'], $data,
function($message) use ($data) {
$message->from($data['email'], $data['name']);
$message->to('info@mysite.com', 'Webmaster / My Site')
->subject('Info Request');
});
}
When I enter áéíóú on the form. Log::info
returns áéíóú