PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am having issues sending mail and changing the line breaks to breaks. I am sending an html email and the line breaks in the mail itself, when received, have \r\n and I have tried using nl2br() but I still get the same result:
Try using "\r\n\r\n". nl2br inserts <br /> or <br > tags before a new line, you're email message probably just a plain text message which ignores <br /> (or <br >).
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
lubber123 wrote:what do you mean by -- "\r\n\r\n". nl2br inserts
Apparently the line break tag (< br / >) was read as html. Use the value "\r\n\r\n" to create a new line break. the nl2br() function insert line break tags < br / > when a new line is encountered.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering