php mail() Q
- Started
- Last post
- 9 Responses
- pixelman
By php I mailt me some tekst and I used the html brake tag in that tekst.
When i receved the mail the brake tag is just in ther but is dosn't brake the line of tekst.How can I fix this?
- spmitch0
\n
- mirola0
try \r
- christoph0
Assumming you're using \n , try using instead \r\n
- enobrev0
\n should be just fine as most email readers interpret \n as a newline regardless. \r is how windows creates a newline, but most win apps can read plain \n jsut fine.
If you're using a break tag, you'll want to set the email up as an html email. It's preobably better to use plain ASCII, get rid of your html tags and use the newlines mentioned above.
If you absoltuely have to have html, look into how to change your mail headers. Her's an old article on it:
http://www.zend.com/zend/trick/h…
if yo google around for html email php you should find plenty of examples.
- enobrev0
sorry.. \r is the mac way, \r\n is the win way, but all of the above should read \n just fine
- mirola0
i don't think \r is platform depenendant.
- enobrev0
just referring t ohow newlines are interpreted...
http://ccrma-www.stanford.edu/~c…
0Dh = \n
0Ah = \rbut i suppose that's just a tangent... back to my procrastination.
- christoph0
\r is also for POSIX.
- mirola0
seems to work on windows and mac