Text Formatting in mail() Function....

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
pvolpe1
Forum Newbie
Posts: 1
Joined: Wed May 28, 2003 1:47 pm
Location: Rochester, NY

Text Formatting in mail() Function....

Post by pvolpe1 »

When ever I send an email using the mail() function, it sends but all the formatting (carriage returns, tabs, et al) are ignored!

Happens when sent from a variety of servers.

wen I place \ before 'special characters', it prints them!

I am assuming that either the mail() fucntion or the process of capturing my $_POST['message'] variable as a string causes special characters to be automatically escaped.

If I send HTML throug the the mail() function, I cannot guarentee the outcome, though it still sends, and there is HTML in the recieved message. Things like color just get skewed.

Any Ideas how I can at least get the carriage returns to work properly?

-pfv
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if you print the value of $_POST['message'] how does it look?

Code: Select all

<?php echo '<pre>', $_POST['message'], '</pre>';
do you want it to be a html-mail?
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

does your server use magic quotes?
Post Reply