NYCPHP Meetup

NYPHP.org

[nycphp-talk] Email Pain

Michael B Allen ioplex at gmail.com
Sat Aug 9 23:41:10 EDT 2008


On Sat, Aug 9, 2008 at 11:33 PM, forest mars <compustretch at gmail.com> wrote:
> "The Unicode standard addresses the problem by defining a large number of
> characters that conforming applications should recognize as line
> terminators"
>
>  LF:    Line Feed, U+000A
>  CR:    Carriage Return, U+000D
>  CR+LF: CR followed by LF, U+000D followed by U+000A
>  NEL:   Next Line, U+0085
>  FF:    Form Feed, U+000C
>  LS:    Line Separator, U+2028
>  PS:    Paragraph Separator, U+2029
>
> HTH,

RFC 2821 states that linebreaks after SMTP commands and headers are
"\r\n" and makes no mention of Unicode.

Mike

> On Sat, Aug 9, 2008 at 10:38 PM, (Margaret) Michele Waldman
> <mmwaldman at optonline.net> wrote:
>>
>> Folks,
>>
>>
>>
>> I'm working with this mail function again.
>>
>>
>>
>> Unhappily.
>>
>>
>>
>> The mail message is created using data off of an html form using radio
>> buttons, selects, text input, etc.
>>
>>
>>
>> The oddest thing is happening.  Sometimes newlines are ignored.
>>
>>
>>
>> Where formated like this:
>>
>>
>>
>> $message = @<<<END
>>
>> This is field 1: $field1
>>
>> This is field 2: $field2
>>
>> This is field 3: $field3
>>
>> This is field 4: $field4
>>
>> END;
>>
>>
>>
>> Or like this:
>>
>> $message = "This is field 1:".$field1."\n";
>>
>> $message .= "This is field 2:".$field2."\n";
>>
>> $message .= "This is field 3:".$field3."\n";
>>
>> $message .= "This is field 4:".$field4."\n";
>>
>>
>>
>> The message might look like this:
>>
>>
>>
>> This is field 1: data
>>
>> This is field 2: data This is field 3: data
>>
>> This is field 4: $field4
>>
>>
>>
>> The only think I could figure out to do was put a \t after $field2 to
>> force the newline.  Nothing else I did seem to work.  The data doesn't
>> appear to have trailing garage either.
>>
>>
>>
>> Any ideas?
>>
>>
>>
>> Margaret Michele
>>
>>
>>
>>
>>
>> _______________________________________________
>> New York PHP Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>>
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list