I'm fetching data from a mysql table (collation 'utf8_unicode_ci') and dynamically fill an email template and send the mail via PHPMailer. As of right now the special characters in the data fetched are displayed correctly. The special characters in the plain text in the mail.html are not.
As per the PHPMailer docs ... when adding $mail->CharSet = 'utf-8';
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->CharSet = 'utf-8';
then the special characters in the plain text in the mail.html are displayed correctly ... but the fetched data from the database not anymore.
What am I missing?
Update:
mysqli_set_charset($mysqli, 'utf8mb4');
... just before the select statement solved the issue.