PHP Classes

email structure

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  email structure  >  (Un) Subscribe thread alerts  
Subject:email structure
Summary:email structure
Messages:3
Author:Christophe Charron
Date:2007-08-01 07:02:55
Update:2007-08-17 07:32:28
 

  1. email structure   Reply   Report abuse  
Picture of Christophe Charron Christophe Charron - 2007-08-01 07:02:55
Hi,
sorry for this very trivial question but in an e-mail, can the bodies (text and/or html), be anywhere in the array or are they always in the first position when there is only one, or in the 2 first positions when they are two ?
And an other quite stupid question but as i'm a beginner in php ... Is there an easy way to find in the array all "BodyFile" values or do I have to parse the all array from start to end ?

Best regards,
Christophe Charron

  2. Re: email structure   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-08-16 22:00:47 - In reply to message 1 from Christophe Charron
E-mail standards do not dictate a particular order but usually within multipart/alternative messages the simplest kind of message body type comes first.

Capable mail programs should try to display the last type of message body type that they support.

This means that usually text parts come before HTML parts.

As for the message structure, I am afraid you need to browse all message parts because depending on whether the messages have text and HTML alternative parts, embedded images or CSS, or even attachments, the structure varies a bit.

  3. Re: email structure   Reply   Report abuse  
Picture of Christophe Charron Christophe Charron - 2007-08-17 07:32:28 - In reply to message 2 from Manuel Lemos
Thanks for these precisions.