Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17307
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "J.O. Aho" <user@example.net> |
| Newsgroups | comp.lang.php |
| Subject | Re: New line character not working in foreach loop |
| Date | Sun, 29 Jan 2017 16:30:35 +0100 |
| Lines | 38 |
| Message-ID | <ef6g4rF4mdkU1@mid.individual.net> (permalink) |
| References | <421a78ff-7a42-4c0a-ba17-816d5d02a285@googlegroups.com> <o6kgok$q8f$1@solani.org> <ef62fkF1tj2U1@mid.individual.net> <o6km1e$uig$1@solani.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net Z0nKkTYVb0INZZYII4SteQC/4R+2G6eBsy/8OFA4Lqb+Hf2/ax |
| Cancel-Lock | sha1:qAf+V5EWMJB6Yc5m9ZCG1xsGYLo= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
| In-Reply-To | <o6km1e$uig$1@solani.org> |
| Xref | csiph.com comp.lang.php:17307 |
Show key headers only | View raw
On 01/29/17 13:09, Christoph M. Becker wrote:
> On 29.01.2017 at 12:37, J.O. Aho wrote:
>
>> On 01/29/17 11:39, Christoph M. Becker wrote:
>>
>>> On 29.01.2017 at 03:19, wart2ww wrote:
>>>
>>>> The code I have works correctly except the \n newline character is not working. When the email message is sent, the index values are all printed on one line. What have I done wrong?
>>>>
>>>> foreach ($_POST as $key => $value) {
>>>>
>>>> if (isset($fields[$key])) {
>>>> $emailText .= "$fields[$key]: $value\n"; }
>>>> }
>>>
>>> The proper newline character sequence for emails is CRLF, i.e. "\r\n".
>>> While some MTAs have problems with CRLF, others may actually require it.
>>
>> It's not the issue with the MTA as this don't seem to be the mail header
>> which should be have "\r\n", but in the body itself, then it's a lot
>> about the client used, this mail would look like intended in Thunderbird
>> and would still just be one liner in Outlook, no matter if you have
>> "\r\n" or "\n".
>
> Even if there is
>
> Content-Type: text/plain
>
> If so, Outlook would be *seriously* broken.
>
Yes, even if so and yes it's seriously broken mail client.
https://naveensnayak.wordpress.com/2012/08/30/ms-outlook-messing-up-line-breaks
--
//Aho
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
New line character not working in foreach loop wart2ww <fcc@bmi.net> - 2017-01-28 18:19 -0800
Re: New line character not working in foreach loop Jerry Stuckle <jstucklex@attglobal.net> - 2017-01-28 22:54 -0500
Re: New line character not working in foreach loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-01-29 11:39 +0100
Re: New line character not working in foreach loop "J.O. Aho" <user@example.net> - 2017-01-29 12:37 +0100
Re: New line character not working in foreach loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-01-29 13:09 +0100
Re: New line character not working in foreach loop "J.O. Aho" <user@example.net> - 2017-01-29 16:30 +0100
Re: New line character not working in foreach loop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-30 07:01 +0100
Re: New line character not working in foreach loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-01-31 15:54 +0100
Re: New line character not working in foreach loop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-29 15:04 +0100
Re: New line character not working in foreach loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-01-31 15:59 +0100
Re: New line character not working in foreach loop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-31 17:07 +0100
Re: New line character not working in foreach loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-01-31 17:45 +0100
Re: New line character not working in foreach loop "Peter H. Coffin" <hellsop@ninehells.com> - 2017-02-01 11:04 -0600
Re: New line character not working in foreach loop Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-02-03 13:48 +0100
csiph-web