awesomemotive / WP-Mail-SMTP

The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 3 million sites.
https://wordpress.org/plugins/wp-mail-smtp/
GNU General Public License v3.0
55 stars 35 forks source link

UTF-8 Encoding #98

Closed yancho closed 3 years ago

yancho commented 3 years ago

Hi,

I am copying this from the WP support forum since I believe it is a bug.

We are noticing that the emails sent with WPMail SMTP are being wrongfully encoded. While the header shows they are encoded in UTF-8, wherever a non-UK language character is seen in the email, a few garbled texts is visible.

Date: Tue, 10 Aug 2021 18:08:17 +0000
From: =?UTF-8?Q?Parro=C4=8B=C4=8Ba_=C4=A6ad-DDDDDD?= <XXXXXXX@XXXX.org>
Bcc: pXXXXXg
Reply-To: XXXXXX@XXXXX.org
Message-ID: <2021010.34405847@smtp-relay.mailin.fr>
X-Mailer: WPMailSMTP/Mailer/sendinblue 2.9.0
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
To: XXXX@gmail.com
Subject: =?UTF-8?Q?Grazzi_tal-booking_tieg=C4=A7ek?=

Note: Subject: =?UTF-8?Q?Grazzi_tal-booking_tieg=C4=A7ek?=

We tried also to use the PHP Mail within the plugin, to double check whether it was SendGrid wrongly forcing the strange characters in the subject and elsewhere:

Date: Wed, 11 Aug 2021 10:33:52 +0000
From: XXX@gmail.com>
Reply-To: XXX@gmail.com
Message-ID: <XXXXXXXXXXXXhazsQU@mXXXXt>
X-Mailer: WPMailSMTP/Mailer/mail 2.9.0
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
To: XX@XXX
Subject: =?UTF-8?Q?Booking_tal-Ikel_ming=C4=A7and_XXX_XXX?=

Note: Subject: =?UTF-8?Q?Booking_tal-Ikel_ming=C4=A7and_XXX_XXX?=

So we disabled the plugin altogether and voila, no UTF-8 issues:

To: XXX@XXX
Subject: Grazzi tal-booking tiegħek
Date: Wed, 11 Aug 2021 10:39:32 +0000
From: XXX@XX
Reply-To: XXX@XXX
Message-ID: <XXXXXXXXXXXXw@mXXXX>
X-Mailer: PHPMailer 6.4.1 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

Note: Subject: Grazzi tal-booking tiegħek

Looking at above: both Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit are similar in all the 3 cases, so we are at a loss what could be going wrong. Do you have any pointers, please?

Any help is extremely appreciated

capuderg commented 3 years ago

Hi @yancho,

as I can see from your WP support thread you fixed the issue by updating to the latest version of our plugin.

I'm closing this issue and thanks for letting us know.

Take care!