I have a PHP webshop that automatically sends a confirmation email. Below is part of the script. My problem is that the line breaks do not work. In MS Outlook the text appears as one long line. I tried things like \n, \r\n, <br>\n, but non worked. How can I solve this?
In fact, the line breaks sometimes work, and sometimes not. The result will look something like this:
ATACAMA DESERT - SALTA
= Ojos del Salado - 1:75.000
CENTRAL ANDES - MENDOZA
= Aconcagua - 1:100.000
3 = Aconcagua - 1:50.000
= Cordón del Plata - 1:50.000
= Paloma & El Plomo - 1:50.000
= Volcán San José & Cajón del Maipo - 1:50.000 LAKES DISTRICT - BARILOCHE = Comarca Andina del Paralelo 42° - 1:120.000
1 = Tronador & Paso de las Nubes - 1:50.000 = Parque Nacional Los Alerces - 1:120.000 = Ruta de los Siete ***** - 1:125.000 = San Carlos de Bariloche - 1:50.000 = San Carlos de Bariloche & Alrededores - 1:125.000
Maybe I should explain a bit more. The email sent is a plain text message, and not a HTML email. I've found plenty of threads on line breaks in HTML mail, but none gave the answer on a plain text email.
I feel your pain and been through it before. Outlook has a nasty habit of removing what it thinks is "extra line breaks" in plain text emails. Sometimes, if the recipient is saavy enough they can choose to restore line breaks from the messages options. This is hardly practical, but it will get you a decent printout.
I've only found a few solutions to making email universally compatible with Outlook.
Send the message as html
Use double line breaks (\n\n)
Just out of curiosity, are you on version 2003?
The attachment shows an illustration of this problem. by clicking on the bar you can choose to restore the line breaks