Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#53894 new defect (bug)

=?us-ascii? in the subject line

Reported by: williamyun7's profile williamyun7 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Mail Keywords: reporter-feedback
Focuses: Cc:

Description

I recently updated my WP to 5.8 from 4.8 leaving all plugins not updated I receive a notification from Gravity Form with a subject including =?us-ascii? at the beginning.

This issue occurs:

  • WP Updated to 5.8 and no plugin updates

This issue does not occur:

  • WP remains 4.8 and all Plugins updated

It is definitely a bug by updating to 5.8.

Change History (7)

#1 @williamyun7
3 years ago

I have tested all different WPs.

This issue starts occurring from 5.5 and above.
Tested 5.4.6 and below and it is all working fine.

Anything changed in handling phpmail function from 5.5?

#2 @SergeyBiryukov
3 years ago

  • Component changed from General to Mail
  • Keywords reporter-feedback added
  • Version changed from 5.8 to 5.5

Hi there, welcome to WordPress Trac! Thanks for the report.

Anything changed in handling phpmail function from 5.5?

In WordPress 5.5, the PHPMailer library was updated from version 5.2.27 to 6.1.6, see [48033] / #48033. This was a major update with a lot of changes, so any plugins working with emails might require an update for compatibility.

Does the issue still exist if you update Gravity Forms and all the other plugins to the latest versions?

Setting the Version to 5.5 as the earliest applicable version.

#3 @williamyun7
3 years ago

Hi,

I can see this is a bug from PHPMailer in that version.

https://github.com/PHPMailer/PHPMailer/issues/2115

Are you able to provide us with a workaround for this?

#4 @SergeyBiryukov
3 years ago

Reading through the GitHub issue, it seems to only happen if the subject is already encoded before being passed to PHPMailer, which not the recommended practice, as PHPMailer itself should take care of the encoding.

If the subject is not encoded before being passed to PHPMailer, then the double-encoding does not happen and it seems to work as expected both for the issue reporter and for the PHPMailer maintainer.

Does it still happen if you update Gravity Forms and all the other plugins to the latest versions?

#5 @williamyun7
3 years ago

Yes with up to date Gravity Form, the issue still occurs. With 5. 4 and below, no issue at all.

#6 @williamyun7
3 years ago

Below is a response from Gravity Forms.

Gravity Forms does NOT encode the notification properties. We can’t replicate this issue on any of our test sites and don’t have any other reports of an issue like it which suggests the issue is being caused by something else in your site configuration. Gravity Forms does pass the notifications to WordPress for delivery and WordPress does include a number of filters which themes and other plugins can use to change the email before it is sent.

#7 @SergeyBiryukov
3 years ago

Thanks for the update!

Does it still happen if you update all the other plugins to the latest versions?

Does it still happen with all plugins disabled and a default theme (Twenty Twenty-One) activated?

Note: See TracTickets for help on using tickets.