This patch fix Notice: iconv_mime_decode() but does not solve the problem with non-latin subject
- 🇭🇺Hungary szato
I got mentioned notice and empty subject in maillog if email address contains "+" sign.
Patch #7 solved my issue, thanks. - 🇨🇦Canada leducdubleuet Chicoutimi QC
In this current issue, the patch in comment #7 is using the following for line 45 in the file src/Plugin/Mail/Maillog.php:
$record->subject = mb_substr(iconv_mime_decode($record->subject, ICONV_MIME_DECODE_CONTINUE_ON_ERROR), 0, 255);
And in the #3331181, the MR is using the following for line 45:
$record->subject = mb_substr($record->subject, 0, 255);
So in #3331181, the decoding with iconv_mime_decode was completely removed instead of continuing on error in the patch here in #7.
I tested both patch and they work for me.
But which one would be best to cover all use cases?
Thanks to all contributing to this great module!
- 🇦🇺Australia jordan.jamous
For me, as I am trying to send emails in Greek, adding
ICONV_MIME_DECODE_CONTINUE_ON_ERROR
ignores all none Latin characters, which again I end up with an empty subject. Patch at #3331181 🐛 Empty subject if any non-latin characters used Needs review worked for me - Merge request !15Issue #3323286: Return raw subject if iconv_mime_decode fails → (Closed) created by mably
- last update
9 months ago 3 pass, 2 fail - last update
9 months ago 5 pass - last update
9 months ago 5 pass - last update
9 months ago 5 pass - last update
9 months ago 5 pass - last update
9 months ago 5 pass - 🇫🇷France mably
My latest MR #15 should handle nicely both raw or mime encoded subject strings.
We only call
iconv_mime_decode
if subject is a mime encoded string (checked with regexp). - 🇺🇸United States DamienMcKenna NH, USA
An alternative solution from super_romeo that I think is a better approach: 🐛 Empty subject if any non-latin characters used Needs review
- Status changed to Needs review
9 months ago 12:29pm 9 March 2024 - last update
9 months ago Patch Failed to Apply - Status changed to Fixed
9 months ago 12:34pm 9 March 2024 -
DamienMcKenna →
committed 97946bb5 on 8.x-1.x
Issue #3323286 by mably, DamienMcKenna, _pratik_, ressa, super_romeo,...
-
DamienMcKenna →
committed 97946bb5 on 8.x-1.x
- 🇫🇷France mably
Hi, sadly you get things like this now, don't know if it's really better than an empty string ;)
-
DamienMcKenna →
committed 7693bdfd on 8.x-1.x
Issue #3323286 by mably, DamienMcKenna: Handle subjects that are MIME...
-
DamienMcKenna →
committed 7693bdfd on 8.x-1.x
- 🇺🇸United States DamienMcKenna NH, USA
Thank you for reporting this, I was mistaken in my decision.
I've committed the merge request with some minor additions for documentation.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇭🇺Hungary atomi
When is this error expected to be fixed?
Is it already fixed in the August .dev version?Notice: iconv_mime_decode(): Detected an illegal character in input string
- 🇷🇴Romania Kosa Ilma
I see that it has already been merged into the development version.
I am using the stable release version (8.x-1.1) of the module, so I had to recreate the patch for that version.
Here is the patch file if anyone needs it. - 🇭🇺Hungary atomi
Kedves Ilma! Inkább megvárom a végleges verziót, nem szeretek toldozgatni, foltozgatni. :-)
A Maillog modul fejlesztője vagy?