Is there a definitive message format defined somewhere?

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 / ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-30-2005
Shawn Wilson
 
Posts: n/a
Default Is there a definitive message format defined somewhere?

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


Reply With Quote
  #2 (permalink)  
Old 11-30-2005
Steve
 
Posts: n/a
Default Re: Is there a definitive message format defined somewhere?


> 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

Reply With Quote
  #3 (permalink)  
Old 11-30-2005
Kimmo Laine
 
Posts: n/a
Default Re: Is there a definitive message format defined somewhere?

"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


Reply With Quote
  #4 (permalink)  
Old 12-02-2005
C.
 
Posts: n/a
Default Re: Is there a definitive message format defined somewhere?

> 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.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:01 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0