Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decoding subjects behaves differently if they contain special chars vs. them not containing special chars (GMAIL) #500

Open
oe-leonhard opened this issue Jun 12, 2024 · 0 comments

Comments

@oe-leonhard
Copy link

oe-leonhard commented Jun 12, 2024

Describe the bug
When using iconv as message subject decoding option, subjects not containing a special character but containing an Umlaut, will lead to the subject to have _ instead of blanks.

Subjects that contain both special chars and at least one umlaut though, will be decoded properly and result in blanks staying blanks.

Used config
Standard config except that decoders.message.subject is set to iconv

Code to Reproduce
set above mentioned config and then:

  • echo $message->subject of a message where subject is um zu läuten => which will lead to decoded subject um_zu_läuten
  • echo $message->subject of a message where subject is um zu läuten! => which will lead to decoded subject um zu läuten!

Expected behavior
Blanks should stay blanks after decoding, therefore no _ getting into the subject during decoding.

Server:

  • OS: alpine 3.19.1
  • PHP: 8.2
  • Version 5.5.0
  • Provider: Gmail

Additional context
I'm using the laravel wrapper, using laravel 10.

Observation:
If omitting the decoder.message.subject option comletely, therefore getting undecoded subjects, and then using iconv_mime_decode directly, does NOT lead to blanks getting replaced with _ however for the sake of keeping code short and clean, I would prefer the package to handle decoding properly and consistent over me using iconv_mime_decode all over the place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant