Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17305
| Path | csiph.com!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.php |
| Subject | Re: New line character not working in foreach loop |
| Date | Sun, 29 Jan 2017 15:04:40 +0100 |
| Organization | PointedEars Software (PES) |
| Lines | 35 |
| Message-ID | <5236537.lOV4Wx5bFT@PointedEars.de> (permalink) |
| References | <421a78ff-7a42-4c0a-ba17-816d5d02a285@googlegroups.com> <o6kgok$q8f$1@solani.org> |
| Reply-To | Thomas 'PointedEars' Lahn <php@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Trace | solani.org 1485698680 4803 eJwFwQkBwEAIAzBNHLSAHMbjX8ISKIXtRtBwuHKeF3pjAltTIm+8b8bk0mWjP6bfU2hS9Qc3pxF4 (29 Jan 2017 14:04:40 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sun, 29 Jan 2017 14:04:40 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| Cancel-Lock | sha1:qIualxiq7fFazjNYaYHAaTx4/mI= |
| X-User-ID | eJwNx0cBwDAMBDBK8TgPOl78IbT6CWJk7WowxeFuvC9OhZv81oGUDdJ/bUXTtlOc4SXN7XielLTDeEW3+gFjPxWk |
| X-NNTP-Posting-Host | eJwFwYkBwCAIA8CVmvJExyEo+4/gXVgim56RHhOzP5wGeiST4NyXi1fR63AKxaUCWa787dYDK8cRug== |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqh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only | View raw
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,
If there are any, screw them; obviously their developers do not want their
users, and their users who are Internet service providers do not want their
customers, to receive proper e-mails. Those bugs ought to be fixed, and
there is no leverage on those people if you keep catering to their bugs.
Industry standards exist to be followed, not ignored.
> others may actually require it.
*All* software _MUST_ require it in the sense that is specified:
<https://tools.ietf.org/html/rfc5322#section-2.1>
Are you confusing MTAs and MUAs?
--
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
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