> > Bug in: http://cz.php.net/manual/en/function.mail.php
> >
> > Example 2. Sending mail with extra headers.
> >
> > mail("[EMAIL PROTECTED]", "the subject", $message,
> > "From: [EMAIL PROTECTED]"
> > ."Reply-To: [EMAIL PROTECTED]"
> > ."X-Mailer: PHP/" . phpversion());
> >
> > -----------
> > That's not correct mail header (see RFC822, STD3).
>
> Please quote the section which describes this, I can not find it in the
> RFC.
>
Section 6.1 defines SYNTAX and allows for mailbox to be defined in one of
two ways:
mailbox = addr-spec ; simple address
/ phrase route-addr ; name & addr-spec
The address format noted in the example is the first one "simple address"
which requires that the email address be specified used "addr-spec".
addr-spec is defined as:
addr-spec = local-part "@" domain ; global address
Which does *NOT* include the <> delimiters. They are only required for the
second form of mailbox "name & addr-spec" with phrase being the realname
portion defined earlier in the document a string containing a limited set of
legal charatcers, or a quoted string containing 7-bit characters (exluding
control characters). "route-addr" is then defined as:
route-addr = "<" [route] addr-spec ">"
And this is where we find addr-spec (with optional route syntax)
encapsulated in <>s.
Bottom line, the example (which contains only an addr-spec with no route or
phrase) is correct and in conformance with RFC822.
-Sara
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php