Cutting off piped emails
Moderator: mkoch227
Re: Cutting off piped emails
Just messaged you the error
Tim
Tim
Re: Cutting off piped emails
Found it - the quoted_printable_encode function is available only since PHP 5.3.0 (unlike the quoted_printable_decode which is since PHP 4).
What version of PHP are you guys running?!?
Try downloading this file again and see if you have any luck:
http://www.hesk.com/extras/hesk250_email_parser.zip
What version of PHP are you guys running?!?


Try downloading this file again and see if you have any luck:
http://www.hesk.com/extras/hesk250_email_parser.zip
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Cutting off piped emails
I'm running 5.3
I've tried the new file and it seems to be working- I'll let you know
Tim
I've tried the new file and it seems to be working- I'll let you know
Tim
Re: Cutting off piped emails
I won't bother with the full debug message. Here's where the problem lies:
Fatal error: Call to undefined function quoted_printable_encode() in /home5/visualf4/public_html/hesk_WRJ7xfau/inc/mail/email_parser.php on line 841
It appears that quoted_printable_encode() is a PHP 5.3 function. We're using 5.2.17.
Fatal error: Call to undefined function quoted_printable_encode() in /home5/visualf4/public_html/hesk_WRJ7xfau/inc/mail/email_parser.php on line 841
It appears that quoted_printable_encode() is a PHP 5.3 function. We're using 5.2.17.
Re: Cutting off piped emails
I tried imap_8()/imap_qprint() instead of the quoted_printable_ functions and the fetching now works. The email text is still mangled, though.
Re: Cutting off piped emails
ascott - yes, we found the issue, see few posts above.
Try downloading this again:
http://www.hesk.com/extras/hesk250_email_parser.zip
If you still have problems after using this updated file please send a sample email that gets truncated to pop3test AT hesk DOT com.
Try downloading this again:
http://www.hesk.com/extras/hesk250_email_parser.zip
If you still have problems after using this updated file please send a sample email that gets truncated to pop3test AT hesk DOT com.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Cutting off piped emails
Sorry about that, our messages crossed.ascott - yes, we found the issue, see few posts above.
I tried the new file, but the messages are still truncated. The problem character appears to be ’
I'll send off a sample email.
Re: Cutting off piped emails
Could you confirm you don't have mb_string extension enabled on the server?
Does this file fix the issue for you?
http://www.hesk.com/extras/email_parser2.zip
Does this file fix the issue for you?
http://www.hesk.com/extras/email_parser2.zip
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Cutting off piped emails
Yes, the mb_string extension is enabled. I tested mb_decode_numericentity() on another page and it worked okay with ’.
As you might guess, the new file didn't help.
As you might guess, the new file didn't help.
Re: Cutting off piped emails
I added some test code to dump the contents of $file out to files at various points in hesk_convert_to_utf8_and_clean_html_entities(). From what I can see, the email message is being returned correctly from that function. The problem character is being returned as three byte UTF-8.
Re: Cutting off piped emails
It looks like the culprit is strip_tags(). The message is okay before it's called at line 769 in email_parser.php and then truncated after the call.
Re: Cutting off piped emails
I think I found the problem. My problem email message contains several pairs of << and >>. In the original HTML, those are encoded as < and >. At around line 980 of email_parser.php the entity references get switched back to the original < and >. Those characters break the HTML tag structure, so strip_tags() gets confused and removes text that it shouldn't.
Re: Cutting off piped emails
Thanks for reporting this.
I am currently out of the country, but will see if I can reproduce the issue and fix it when I return.
I am currently out of the country, but will see if I can reproduce the issue and fix it when I return.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Cutting off piped emails
Is there any ETA on a fix for this? Emails are being cut off a lot, and its come at the worst time for my organisation!
Re: Cutting off piped emails
Did you try the latest file posted?
http://www.hesk.com/extras/email_parser2.zip
http://www.hesk.com/extras/email_parser2.zip
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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