Sending text from Text Area to HTML Email not formatting properly?

  • Thread starter Thread starter Kokon B
  • Start date Start date
K

Kokon B

Guest
You should not allow to user really format the text. You should do it yourself. Use the command nl2br (in php) - it change the text from new line to <br> tag. That is what you can do. You should take away from $_POST['message'] all tags or make a htmlentities() with it. It is a safe way to send the html email without attachments etc.
 
I want to send an HTML email. The Content of the email is whatever the user puts in a text area. This text area uses paragraphs, underlined and bold text, Ariel Font etc. When the email arrives in my inbox. The underline and bold text is fine but it does not add paragraphs or my font type.

I am basically sending this:

$_POST['message'];

I am also inline tags not css to do it.

When I test what $_POST['message'] returns it contains the paragraphs and font tags but does not change when sent in an email.

No idea what the problem is! :(

Cheers for any help
 
Back
Top