1

I think im doing things correct:

  • Im specifying charset of PHPMailer object: $mail->CharSet = "UTF-8";
  • Charsets of mail body and php script are UTF-8 too

But email arrives with this kind of errors (words are broken by black quarter with "?" symbol:

Update 1

Found something kinda chinese glyphs (but not cyrillyc symbols) in the email's source

Stepan Yudin
  • 470
  • 3
  • 19
  • If you view source on a received message, do these corrupt chars coincide with line breaks? If you change the content slightly, do the characters that are corrupted change? Are you sure that the text is not sorrupt before you pass it to the emssage? – Synchro Mar 17 '15 at 08:58
  • These chars are not corrupted (i make an output to page simultaneously wit email sending). And there are no line breaks in this positions. Line breaks processing correctly. – Stepan Yudin Mar 17 '15 at 14:53
  • You didn't answer the questions I asked. Look in the source of the received mesage - I'm not talking about your original text or your web output, which can be entirely different. – Synchro Mar 17 '15 at 15:18
  • Wow. I looked at the mail source in gmail and i was amazed: sources cyrillic symbols are like chinese glyphs. Take a look at these screenshots: [normal mail body fragment](https://drive.google.com/file/d/0B9W_Uqobhvi0aVE0c2JVV1prRTQ/view?usp=sharing) and [mail source](https://drive.google.com/file/d/0B9W_Uqobhvi0aHZ2MjU2SnJHRWs/view?usp=sharing) – Stepan Yudin Mar 18 '15 at 04:34
  • That doesn't look good. Can you cut it back to a minimal example that shows the problem and post the actual data in your question, then I will have something to work with. – Synchro Mar 18 '15 at 07:58

2 Answers2

6

Try:

$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';

as staded by user2354947 in PHPMailer character encoding issues

the CharSet definition must be entered after the PHPMailer()

Community
  • 1
  • 1
hsols
  • 71
  • 7
0

similar to my problem PHP ASCII to UTF-8 does not work

i found out that when you pull your data from sql, you need to transform it to UTF-8

Led
  • 662
  • 1
  • 19
  • 41