D
D
Dim Boy2015-12-13 19:33:51
Character encoding
Dim Boy, 2015-12-13 19:33:51

Why are there several letters in the wrong PHPMail encoding?

The code is encoded:

$headers .= "Content-type: text/html; charset=utf-8\r\n";
+
$mail->CharSet = 'utf-8';

But slips such 2-3 letters in all letters!
скоÐ �іюйтеналÐ �штуваннях
I tried these options together and separately, it doesn’t help - maybe you need to configure them separately?
(Ubuntu server)
$message = iconv("UTF-8", "WINDOWS-1251", $message);
$message = mb_convert_encoding("UTF-8", "WINDOWS-1251", $message);
$message = mb_detect_encoding($message , mb_detect_order(), true) === 'UTF-8' ? $message : mb_convert_encoding($message , 'UTF-8');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dim Boy, 2016-01-24
@twix007

In fact, the question is relevant to this day. In the letter, the formatting and text are normal, but this is the same as in the picture in each letter.
0bbbc9458d3e443ca245ed09e26302a4.png

E
entermix, 2016-01-24
@entermix

>You need to make it with html code, but nothing works... poke pliz!
What does it mean to make html code?
This?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question