New lines in text/html mail()

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!

Moderator: General Moderators

Post Reply
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

New lines in text/html mail()

Post by Steveo31 »

I'm sure this has been asked/answered before, but nothing came up on the search. I can make newlines with \n in a text/plain email, and I can have HTML in a text/html email, but not both.

I've tried \r\n to no avail either.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

what?
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

ya what Phenom said, What??

do you even knwow aht your asking??

Have you tried <br>??
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

Hah.. yes I know what I am asking.

In a mail() function, I can make newlines (line breaks) with "\n" if the content type is text/plain. However, this doesn't allow for HTML like <b> tags and whatnot.

If the content type is text/html, the "\n" don't work.

Sorry for the confusion.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Yea.. what are you asking.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

how to make it work?
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

Nevermind :)
Post Reply