PHP Classes

Problems with Long Subjects

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Problems with Long Subjects  >  (Un) Subscribe thread alerts  
Subject:Problems with Long Subjects
Summary:Spaces are getting removed at some places for long subjects
Messages:13
Author:Raja Sekhar
Date:2012-03-08 17:08:46
Update:2012-03-29 08:23:14
 
  1 - 10   11 - 13  

  1. Problems with Long Subjects   Reply   Report abuse  
Picture of Raja Sekhar Raja Sekhar - 2012-03-08 17:08:46
Hi,

When I am using the parser on emails where the subject is very long, I am facing issues as the white spaces near the line breaks are getting stripped off.

One can easily test this by just sending a mail with very long subject from a email client and then save that email into a file and run the parser on it.

Where ever there are line breaks in the subject (the long subject would automatically be converted into multiple lines somewhere along the email transmission) the spaces between the words are getting removed.

For example
"Testing really really long subjects we really do not know when and where this subject line will break or it might just not break beause we are trying to test this piece now which is also called as murphys law which keeps into play when ever you are trying to do something cool"

is getting converted to
"Testing really really long subjects we really do not know when andwhere this subject line will break or it might just not break beause we aretrying to test this piece now which is also called as murphys law which keepsinto play when ever you are trying to do something cool"

You can see that at position #67, 144, 221 - the space is missing.
I tried fixing the code at line 655 but adding the line
$value .= $character

but this is introducing whitespaces unnecessarily in the subjects.

May be I am not understanding the parser code well to fix this issue.
Any help would be appreciated.

  2. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-03-08 18:33:07 - In reply to message 1 from Raja Sekhar
Can you upload an example message so I can try to reproduce the problem?

  3. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Raja Sekhar Raja Sekhar - 2012-03-09 02:30:27 - In reply to message 2 from Manuel Lemos
Hi Manuel

Thank you for the response. Is there a way I can send an email to you directly instead of uploading?

regards,
Rajs

  4. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Raja Sekhar Raja Sekhar - 2012-03-09 02:30:57 - In reply to message 2 from Manuel Lemos
Hi Manuel

Thank you for the response. Is there a way I can send an email to you directly instead of uploading?

regards,
Rajs

  5. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-03-09 08:07:55 - In reply to message 4 from Raja Sekhar
Try sending to pastebin.com . If your sample e-mail contains private data, just remove it and send only the headers.

  6. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Raja Sekhar Raja Sekhar - 2012-03-09 11:12:12 - In reply to message 5 from Manuel Lemos
Hi Manuel

Please use http://pastebin.com/6ZrwH7LQ to see the sample mail.

  7. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-03-09 19:22:24 - In reply to message 6 from Raja Sekhar
You need to make that code in pastebin.com public so I can see it.

  8. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Raja Sekhar Raja Sekhar - 2012-03-09 19:38:03 - In reply to message 7 from Manuel Lemos
Sorry. Please read now - http://pastebin.com/6ZrwH7LQ

  9. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-03-11 08:36:13 - In reply to message 8 from Raja Sekhar
It seems it has expired but I was able to create a sample message to reproduce the problem.

The problem is fixed and the fixed version was uploaded now. Thanks for reporting.

  10. Re: Problems with Long Subjects   Reply   Report abuse  
Picture of Raja Sekhar Raja Sekhar - 2012-03-11 16:11:19 - In reply to message 9 from Manuel Lemos
Thank you Manuel for great support! I tested with the latest fix and the problem seems to have vanished. Thanks once again!

 
  1 - 10   11 - 13