updated stripQuotedText to also strip quoted mail header

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
spiorf
Posts: 1
Joined: Sat Oct 29, 2016 9:47 pm

updated stripQuotedText to also strip quoted mail header

Post by spiorf »

Hi,
I'm using Hesk with mike-koch's mods-for-hesk and made a fix. He suggested to post it here too.
Ticket replies imported from email kept the previous mail header in the answer text. This change looks for the header with a regex and if it is before the "do-not-remove" line, cuts there. It may not always work, because the header depends on the mail client.

https://github.com/mike-koch/Mods-for-H ... 7f16a4599f
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: updated stripQuotedText to also strip quoted mail header

Post by Klemen »

Thanks for sharing.

Reliably detecting removing quoted messages is a nightmare (Google even has a rather complicated process patented) because email clients don't have standard way of doing it. Things get even worse when you start adding support for multiple languages into the mix.

While your fix works for a very specific email client (but may cause problems elsewhere), I currently do not plan on improving Hesk's quoted message functionality.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply