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

[BUG] Problem with encoding #572

Closed
tito10047 opened this issue Jan 12, 2021 · 2 comments
Closed

[BUG] Problem with encoding #572

tito10047 opened this issue Jan 12, 2021 · 2 comments
Labels
needs investigation This will be tested / debugged or checked out.

Comments

@tito10047
Copy link

Environment (please complete the following information):

  • PHP IMAP version: 4.1.0
  • PHP Version: 7.2.7
  • Type of execution: CLI

Describe the bug
I received some unknown encoding from $mail->textHtml . After received text I want to use in preg_replace and output is null
In version 3.1.0 was everything ok, today I switch to 4.1.0 and I have this problem

To Reproduce
email is in attachment

The used code:

$emailBody = $mail->textHtml;
$emailBody = preg_replace('~<style(.*?)</style>~umsi', "", $emailBody);

The headers of the parsed email, if required and possible (only, if it's NOT confidential):

Subject: test
Thread-Topic: test
Thread-Index: AQHW6OQF024C5Wt1Mk2B/tHD6Yarhw==
Date: Tue, 12 Jan 2021 13:08:29 +0000
Message-Id: <cd25dec5b47c4586a1d9178924a067a6@dsidata.sk>
Accept-Language: cs-CZ, sk-SK, en-US
Content-Language: cs-CZ
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator: <cd25dec5b47c4586a1d9178924a067a6@dsidata.sk>
X-MS-Exchange-Organization-MessageDirectionality: Originating
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 04
X-MS-Exchange-Organization-Network-Message-Id: 086d3ed1-3422-4529-2f74-08d8b6fb2826
X-MS-Exchange-Transport-EndToEndLatency: 00:00:00.2162177
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
...

test-email.zip

@tito10047 tito10047 added the needs investigation This will be tested / debugged or checked out. label Jan 12, 2021
@tito10047 tito10047 changed the title [BUG] Proglem with encoding [BUG] Problem with encoding Jan 12, 2021
@Sebbo94BY
Copy link
Collaborator

Can you still reproduce this issue in the release 4.3.0?

@Sebbo94BY
Copy link
Collaborator

I've just released a new version 4.5.3 with some more improvements regarding these encoding issues and some unit tests.

Relates to #657.

Feel free to reopen this issue, if you should be still able to reproduce your issue(s) or just open a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation This will be tested / debugged or checked out.
Projects
None yet
Development

No branches or pull requests

2 participants