This is a discussion on Is there a definitive message format defined somewhere? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I am trying to parse email messages in their raw form and I am having trouble with different mail programs / ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am trying to parse email messages in their raw form and I am having
trouble with different mail programs / services and the way they format their messages. Namely, I'm trying to find a definitive way to split the body of a message out from the whole source. The only trend I see so far is that between the headers and the body there is a single blank line... is that the only way I have to tell that the body has started? Also, at the end of the body, is there a definitive end point? Or is it just a blank line as well? Surely there has to be some spec outlined out there... but so far all I'm finding is vague information. Thanks in advance! -- Shawn Wilson |
|
|||
|
> I am trying to parse email messages in their raw form and I am having > trouble with different mail programs / services and the way they format > Surely there has to be some spec outlined out there... but so far all I'm > finding is vague information. Do you know, I think there might be a few specs knocking around somewhere on the Interweb. Try these for starters: <http://www.ietf.org/iesg/1rfc_index.txt> --- Steve |
|
|||
|
"Steve" <googlespam@nastysoft.com> wrote in message
news:1133337584.285657.319470@f14g2000cwb.googlegr oups.com... > >> I am trying to parse email messages in their raw form and I am having >> trouble with different mail programs / services and the way they format > >> Surely there has to be some spec outlined out there... but so far all I'm >> finding is vague information. > > Do you know, I think there might be a few specs knocking around > somewhere on the Interweb. Try these for starters: > <http://www.ietf.org/iesg/1rfc_index.txt> Specificly RFC 821 for SMTP and RFC 822 for email... -- "En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö antaatulla.sikanautaa@gmail.com.NOSPAM.invalid |
|
|||
|
> I am trying to parse email messages in their raw form
Sorry Shawn - there's no such thing as a 'raw form'. There's a representation of an email when communicated by various protocols as defined by lots RFCs (or also ITU standards too if you want to count x400). Most of these (SMTP, POP) have a blank line between the headers and body. How an MTA/MDA/MUA store a message is entirely up to the developer of that product, although again there are various standards (but not as well documented as the comms protocols) e.g. Unix Mbox, maildir. C. |