You are here: Re: mail() - message lines <= 70 chars « PHP Programming Language « IT news, forums, messages
Re: mail() - message lines <= 70 chars

Posted by C. (http://symcbean.blogspot.com/) on 11/23/07 13:18

On 22 Nov, 16:47, John Dunlop <j...@dunlop.name> wrote:
> Matthew:
>
> > The manual page for PHP's mail() function (URL below) says that for the
> > message (IE. email body) "Each line should be separated with a LF (\n).
>
> Should be CRLF.
>
> http://www.apps.ietf.org/rfc/rfc2822.html#sec-2.1
>
> > Lines should not be larger than 70 characters."
>
> Should be 78.
>
> http://www.apps.ietf.org/rfc/rfc2822.html#sec-2.1.1
>
> --
> Jock

No - that's SMTP which is a specific transport mechanism for email
(actually its a whole family of protocols but lets not go there) its
up to the MUA ('mail' command on Unix or the SMTP implementation
within PHP for |MSWin) to **convert** the message to a suitable format
for the MTA, which may in turn encode the message in a different
format depending on the carrier protocol.

Perhaps historically the SMTP implementation in PHP couldn't
accomodate this.

If you sniff the SMTP connection you'll see that long lines do get
wrapped - but the original message is restored when it comes out the
MUA at the other end.

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация