Re: correct email formatting

From: Date: Thu, 28 Sep 2000 02:13:08 +0000
Subject: Re: correct email formatting
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-17841@lists.php.net to get a copy of this message
On Thu, 28 Sep 2000, Justin French wrote: > David Robley wrote: > > > Have you had a look at RFC822? It's pretty much the 'bible'. Nearest copy > > to you might be at > > http://mirror.aarnet.edu.au/pub/ietf/rfc/rfc822.txt > > This was exactly what I was after, thanks. > > They use the term CRLF (carrige return, line feed)... If I were trying > to split an email on these CRLF's (to split the message into headers, > body, etc), what would i split on? > > \n\n ? > \r\n ? > > > > <QUOTE from the RCF> > B.2. SEMANTICS > > Headers occur before the message body and are terminated by > a null line (i.e., two contiguous CRLFs). > > A line which continues a header field begins with a SPACE or > HTAB character, while a line beginning a field starts with a > printable character which is not a colon. > > A field-name consists of one or more printable characters > (excluding colon, space, and control-characters). A field-name > MUST be contained on one line. Upper and lower case are not dis- > tinguished when comparing field-names. > </QUOTE> > > > Justin French Funny - I just quoted that at someone here yesterday :-) Stab in the dark time, as I don't know for sure, but.... Looking in my mailbox (on a Linux system), I find that it's 0A hex or linefeed which is the system EOL marker. And a look in my NT thing's mail shows 0D0A which is the MSDOS EOL. So my guess is - use the system EOL for whatever system you are working on. Course I suppose you could do a replace in any case to convert say CRLF to just LF or CR to LF (for Mac EOL to *nix) or somesuch. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#17841) next »