Support

Account

Home Forums General Issues Tracking down an encoding issue

Solved

Tracking down an encoding issue

  • Our application generates alerts and we use ACF fields to hold email subject lines and bodies. The subject line for one type of alert has never worked properly. Because I couldn’t see anything I assumed it was empty but, in working with Local and MailHog to retool the alerts, I learned that there is a subject line, but it’s polluted with encodings, generating

    Subject: =?us-ascii?Q?OSBS:_Your_Use_Application_has_been_Submitted_a?= =?us-ascii?Q?nd_is_Under_Review?=

    instead of

    Subject: OSBS: Your Use Application has been Submitted and is Under Review

    Our methods work for email bodies and for other alert subject lines. It’s all baffling: how it got like this, how to find the root cause, how to fix it.

    I’d appreciate any insights, thanks, I haven’t seen anything like this in many years.

  • I’ll add that these fields are stored in Options pages and are retrieved using

    $subject = get_field('application_approved_subject', 'options');

    before being passed on to wp_mail. Other subjects have no encoding issue, this one does.

  • This issue, if I’m reading this right https://github.com/PHPMailer/PHPMailer/issues/1949 is that your the subject is more than 65 characters long

  • Thanks for chasing that down, @hube2; I came to the same conclusion very late last night and didn’t get around to coming back here to post.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.