cjk4wp / wordpress

1 stars 4 forks source link

Email should be encoded with UTF8 and base64 #4

Open miya0001 opened 6 years ago

miya0001 commented 6 years ago

The plugin WP Multibyte Patch included in the Japanese package is changing the Email charset from UTF-8 to ISO-2022-JP. Actually, almost all the Email clients in Japan can handle UTF-8 now. I guess we don't need to change charset to ISO-2022-JP and email will be broken if the site is multi-languages.

But Gmail is using encoding base64, so base64 is safer than 8bit for old MTAs.

I guess this issue can be shared with the all non-English users.

miya0001 commented 6 years ago

Encoding should be base64?

https://blogram.net/2015/08/04/phpmailer_utf-8/

miya0001 commented 6 years ago

Windows Live uses UTF-8 8bit.

Subject: =?UTF-8?B?xxxxxxxxxxxxxxx==?=
Content-Type: text/plain;
    format=flowed;
    charset="UTF-8";
    reply-type=original
Content-Transfer-Encoding: 8bit
miya0001 commented 6 years ago

Gmail uses UTF-8 Base64

Subject: =?UTF-8?B?xxxxxxxxxxxxxxxxxx==?=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
miya0001 commented 6 years ago

SendGrid requires 7bit (base64).

https://sendgrid.com/docs/Glossary/7_bit_encoding.html

miya0001 commented 6 years ago

https://core.trac.wordpress.org/ticket/44548