Mail format question

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
User avatar
lazersam
Forum Contributor
Posts: 105
Joined: Sat Nov 15, 2003 4:07 am
Location: Hertfordshire, UK

Mail format question

Post by lazersam »

Hi all

I am reading a message from a text file and shooting it out using the mail() function.

When the email arrives the text is unformated i.e. in one big paragraph. How do i get it to display with line breaks, paragraphs etc?

Thanks in advance...

Larry
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Post by hairyjim »

Are you sending HTML or plain text email?
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

these header allow HTML e-mails

Code: Select all

$headers  = "MIME-Version: 1.0\n"; 
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
then just use <br> as you would in normal HTML
User avatar
lazersam
Forum Contributor
Posts: 105
Joined: Sat Nov 15, 2003 4:07 am
Location: Hertfordshire, UK

Post by lazersam »

Thanks... I was sending html messages. The <br> thing works OK. I think I'd like just to send text messages though.

Thanks for the help.

Larry.
Post Reply