Encoding problem subscription email

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
sbien
Registered User
Posts: 3
Joined: Wed Oct 27, 2021 10:57 am

Encoding problem subscription email

Post by sbien »

Hello,

I am running a phpbb forum that I have updated to the latest version on monday. Since then, I received a message from a user stating that the email they got from their topic subscription looks strange. I asked them to forward the email to me and have been trying to figure out what the problem is. It seems that for long topic titles, the subscription email switches encoding halfway during the subject line and this messes up the whole email header. I have replicated this myself, it seems to happen after 25 characters in the title. The weird thing is, it doesn't happen for every topic above 25 characters, since almost all topic titles are longer than that. We have yet to find for how many characters exactly..

I have no idea what caused this, and I'm not even sure this happened during updating to latest version, could be that it was happening before.

Phpbb 3.3.5, language pack is Dutch (casual honorifics)

Edit - additional info: we use our own smtp server to send the mail. Sending a link of the affected topic by mail doesnt show the problem

Screenshot
Image

Subjectline

Code: Select all

Nieuwe reactie in onderwerp - "Labrador Sam op bizarre w =?US-ASCII?Q?ijze ziek geworden =
Email body

Code: Select all

van staalsplinters onkruidborstels?=
=?US-ASCII?Q?."?=
To: =?US-ASCII?Q?testsabine123?= <[email protected]>
From: "=?US-ASCII?Q?Een Hondenleven?=" <[email protected]>
Reply-To: "=?US-ASCII?Q?Een Hondenleven?=" <[email protected]>
Return-Path: <[email protected]>
Sender: <[email protected]>
MIME-Version: 1.0
Message-ID: <[email protected]>
Date: Tue, 26 Oct 2021 22:35:43 +0200
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: phpBB3
X-MimeOLE: phpBB3
X-phpBB-Origin: phpbb://www.eenhondenleven.com
List-Unsubscribe: <https://www.eenhondenleven.com/viewtopic.php?uid=442&t=1017&unwatch=topic>

Hallo testsabine123,

Je ontvangt dit bericht omdat je op een onderwerp bent geabonneerd,
"Labrador Sam op bizarre wijze ziek geworden van staalsplinters
onkruidborstels." op Een Hondenleven. Dit onderwerp heeft een nieuwe
reactie van sabine sinds je laatste bezoek. Er worden geen nieuwe meldingen
verzonden totdat je het onderwerp weer hebt bezocht.

Als je het nieuwste bericht wil bekijken, klik op de volgende link:
https://www.eenhondenleven.com/viewtopic.php?t=1017&e=1&view=unread#unread

Als je het onderwerp wil bekijken, klik op de volgende link:
https://www.eenhondenleven.com/viewtopic.php?t=1017

Als je het forum wil bekijken, klik op de volgende link:
https://www.eenhondenleven.com/viewforum.php?f=7

Als je niet langer meer geabonneerd wil zijn op dit onderwerp, klik dan op
de "Uitschrijven onderwerp" link bovenaan of onderaan het onderwerp, of
door te klikken op de volgende link:
https://www.eenhondenleven.com/viewtopic.php?uid=442&t=1017&unwatch=topic

-- 
Team EenHondenleven.com
User avatar
janus_zonstraal
Registered User
Posts: 6613
Joined: Sat Aug 30, 2014 1:30 pm

Re: Encoding problem subscription email

Post by janus_zonstraal »

Is also reported here: viewtopic.php?p=15770556#p15770556
And I have sometimes the same thing.
Maybe the same host? I'm with Vimexx.
Sorry! My English is bat ;) !!!
sbien
Registered User
Posts: 3
Joined: Wed Oct 27, 2021 10:57 am

Re: Encoding problem subscription email

Post by sbien »

I have turned off our smtp server and when using the built-in board email, there is no encoding issues, however, there are ='s added to the topic title. I suspect these trigger some encoding on our smtp server, but I would be more interested in why they're added in the first place :)

Code: Select all

Nieuwe reactie in onderwerp - "Supermegalangetitel om te testen wat er nou =eigenlijk in den godensnaam mis gaat met de mails van abonnementen??? waaro=m"
janus_zonstraal wrote: Wed Oct 27, 2021 11:54 am Is also reported here: viewtopic.php?p=15770556#p15770556
And I have sometimes the same thing.
Maybe the same host? I'm with Vimexx.
Nope, different host :)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: Encoding problem subscription email

Post by 3Di »

You can disable sending in ASCII and restore UTF-8 by adding a line of code in

includes/functions_messenger.php

search (1857)
$is_ascii = strlen($str) === utf8_strlen($str);

Add the following on a new line
$is_ascii = false;

It's just a workaround, but it should work with smtp server.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
sbien
Registered User
Posts: 3
Joined: Wed Oct 27, 2021 10:57 am

Re: Encoding problem subscription email

Post by sbien »

3Di wrote: Wed Oct 27, 2021 12:34 pm You can disable sending in ASCII and restore UTF-8 by adding a line of code in

includes/functions_messenger.php

search (1857)
$is_ascii = strlen($str) === utf8_strlen($str);

Add the following on a new line
$is_ascii = false;

It's just a workaround, but it should work with smtp server.
Thank you, I will try this :)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: Encoding problem subscription email

Post by 3Di »

sbien wrote: Wed Oct 27, 2021 1:15 pm Thank you, I will try this
I left a comment in the tracker: https://tracker.phpbb.com/browse/PHPBB3 ... ment-64640
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades

Return to โ€œ[3.3.x] Support Forumโ€