Re: Help Sending Mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 11, 2007 12:20 PM, Richard Lynch <ceo@xxxxxxxxx> wrote:
> PS
>
> GMail will not accept \r\n between header lines, only \n
>
> I dunno if RFC822 specifies which ending but I *do* know that this
> breaks the current PEAR mimePart.php code.
>
> Editing the code to hack \r\n to just \n for the _CRLF constant works
> for gmail, but may break other mail clients if \r\n is the RFC822
> correct newline.
>
> PPS
> Is anybody else tired of this endless newline "war" between \n and \r\n?!
>
> Can we just shoot anybody who doesn't accept either as valid?
>

As far as RFC822 is concerned:

     3.1.2.  STRUCTURE OF HEADER FIELDS

        Once a field has been unfolded, it may be viewed as being com-
        posed of a field-name followed by a colon (":"), followed by a
        field-body, and  terminated  by  a  carriage-return/line-feed.
        The  field-name must be composed of printable ASCII characters
        (i.e., characters that  have  values  between  33.  and  126.,
        decimal, except colon).  The field-body may be composed of any
        ASCII characters, except CR or LF.  (While CR and/or LF may be
        present  in the actual text, they are removed by the action of
        unfolding the field.)

and later...

     3.2.  HEADER FIELD DEFINITIONS

          These rules show a field meta-syntax, without regard for the
     particular  type  or internal syntax.  Their purpose is to permit
     detection of fields; also, they present to  higher-level  parsers
     an image of each field as fitting on one line.

     field       =  field-name ":" [ field-body ] CRLF


(http://www.faqs.org/rfcs/rfc822.html)

That said, I can't recall having problems with a simple \n, but I
usually stick to \r\n for mail headers.

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux