[thelist] PHP email problem

Ben Phillips ben at inchima.com
Tue Feb 5 08:43:00 CST 2002


> A couple of suggestions:

thanks for that phil. i just learnt a lot in a very short time...

> You are using stripslashes to remove \s. Are you doubling the
> slashes up for
> \n and \r? If not, you'll only get n rather than \n. You should
> not need \r,
> \n *should* suffice.

unfortunately, still getting the problem. i think the issue is with the
actual $message variable. if it declare the message as follows:

$message = "Hi,\n\nThanks for the message.\n\nRegards,\nBenji.";

then it works fine. if i use actual carriage returns or take the message
from a textarea form element, then it acts funny (as i explained in my first
mail). obviously, the \n is different to what i am getting from the
textarea.

> If you are still having problems, you might want to try HTML
> formatting the
> message and use nl2br($message) to convert \n\r to <br>. You would need to
> change Content-Type:text/html\n

i could do this, but would like to know how to send both text and html mails
out if possible.

thanks again, and hope you can help me further! :o)

benji
inchima.com




More information about the thelist mailing list