Sending a HTML mail to my email

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
clodagh2000
Forum Newbie
Posts: 4
Joined: Fri Aug 10, 2007 9:46 am

Sending a HTML mail to my email

Post by clodagh2000 »

Hi,

How are you all? I have a file created that reads in all the names and email addresses of loads of people, and stores them in a database. I then created another file in php that reads in each name and email address from the database and sends an email to each one. The message in the email is very long, and I put line breaks (<br>) in it. Unfortunately when a recipient recieves the email, the '<br>' tag is showing in the email.

How would I Get rid of the <br> tag showing in the email.

From a confused programmer!
SidewinderX
Forum Contributor
Posts: 407
Joined: Fri Jul 16, 2004 9:04 pm
Location: NY

Post by SidewinderX »

Use \n rather than <br />
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Set the Content-type header to "text/html" for your email ;)
Post Reply