PHP Classes

Sample of emails not parsing + type issues

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Sample of emails not parsing + type...  >  (Un) Subscribe thread alerts  
Subject:Sample of emails not parsing + type...
Summary:These emails do not parse at all by your class
Messages:7
Author:Paul Godard
Date:2012-03-28 07:20:23
Update:2012-04-20 07:21:00
 

  1. Sample of emails not parsing + type...   Reply   Report abuse  
Picture of Paul Godard Paul Godard - 2012-03-28 07:20:23
I have implemented your class and I start to use it in my new system. It really works great. Thank you for that!

They are some emails that do not parse. I have emailed the raw files to [email protected] as I don't see how to attach a file here. Can you please fix these issues?

Also I sometimes get the following message when displaying the $EmailPartsDecoded["Type"]… such as :

Zenobia_Accounting_12-1.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet message parts are not yet recognized. Please contact the author Manuel Lemos and send a copy of this message to let him add support for this kind of messages/ | 20288 bytes

Can you please add this new types in your class?

Paul

  2. Re: Sample of emails not parsing + type...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-04-11 10:47:17 - In reply to message 1 from Paul Godard
Sorry for the delay. Only now I made time to look into this.

I decided to add a generic solution that lets you add custom types for MIME types that the class does not recognize yet.

The update class version was uploaded and the example demonstrates how you can add custom MIME types, so you no longer depend on me to update the class.

Just let me know if you have any other issues.

  3. Re: Sample of emails not parsing + type...   Reply   Report abuse  
Picture of Paul Godard Paul Godard - 2012-04-11 20:36:55 - In reply to message 2 from Manuel Lemos
Thank you Manuel but what about the messages that do not parse correctly (the ones I sent to your email address).

I also have a problem with messages using utf-8 with french accents which do not display correctly.

The same problem when the subject of the email is encoded utf-8. Should you not convert that string in your class?

  4. Re: Sample of emails not parsing + type...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-04-12 12:11:20 - In reply to message 3 from Paul Godard
Which messages? The last message I got only contained one attached message and it parses correctly. What makes you think that it is not working?

As for display messages with UTF-8 or any other type of encoding, keep in mind that if you want to display it in a HTML page, the HTML page must use the same encoding in meta tags like this:

<meta http-equiv="content-type" content="text/html; charset=utf-8">

  5. Re: Sample of emails not parsing - fax...   Reply   Report abuse  
Picture of Paul Godard Paul Godard - 2012-04-19 16:27:11 - In reply to message 4 from Manuel Lemos
Hi Manuel,
Let's do one at a time.
I have sent you an email with in attachment a raw email containing a fax pdf which is not recognized as an attachment but passed into the data as the body of the message.
Please have a look.
Thank you, Paul

  6. Re: Sample of emails not parsing + type...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-04-20 06:05:55 - In reply to message 5 from Paul Godard
This message seems to have been composed by a broken script.

If you noticed the header you can see the multi-part separator is b1_3223af2ecc7896ff8a6c58d7ae8eb53b .

There is some HTML data before the first separator. Although it is not illegal, all that data will be ignored, so the MIME parser class works correctly.

If you try opening that message in Mozilla Thunderbird, you can see that it only shows you the PDF message part, which is exactly what the MIME parser class returns.

  7. Re: Sample of emails not parsing + type...   Reply   Report abuse  
Picture of Paul Godard Paul Godard - 2012-04-20 07:21:00 - In reply to message 6 from Manuel Lemos
OK, I understand. My problem in such case is that I wanted to treat this data as an attachment so it can be downloaded as well.

I found a way to do that.