First some background: I’m writing a system that occasionally has to send out emails automatically. The default text in these emails can be set through use of various html textareas. There’s an option to send out a test email when one of these values has been changed. At the moment I’m using just plain old textareas into which a user can type some nice html. I use standard mail techniques to send the mail.
My problem is that even if the message in the textarea looks like valid html the email arrives with the opening and closing tags all visable. I tried hardcoding the message to say exactly the same thing that was in the textbox and the email comes out looking fine.
So I need to do something to condition the text coming from the textbox before I send it out.
My question is: what is that something?
I know html entities doesn’t do the trick. I’m still looking around the php manual for some function that’ll work.
1 Answer