I have a form and insert some chinese words in database and it's ok. Table charset is UTF8. Problem appears when I select this data and send it via mail as HTML attachment. Then, Chinese doesn't display properly. How to fix charset before send data via mail? Should I use some headers and will it work?
My code looks like that:
//$attachedBodyContent is data from database that contains some chinese words
Mail::send(
"emails.applicationTemplate",
$data,
function($message) use ($data, $template, $subject, $attachedBodyContent) {
$message->to($data['email'], $data['name'])
->from($template['from'],$template['from_name'])
->subject($subject)
->attachData($attachedBodyContent,'YourApplicationData.html');
}
);
</div>