I created a form in html and use php to send email
<form action="xxxxxx" method="post">
<textarea rows="15" cols="80" name="texttosend" >
Here is the list
1) xxxx
2) yyyy
3) zzzz
</textarea>
<input type="hidden" name="do" value="admin" />
<input type="hidden" name="page" value="mytext" />
<input type="submit" class="button" name="sendmail" value="Send" />
</form>
In php, I capture the content of the textarea and send it as html by setting the header of the email as
Content-Type: text/html; charset="iso-8859-1"
However, the email sent out lose all the format (I mean seems all the line return are gone and all line are shown in one line. So I try to wrap the content of textarea within <p> </p> but it doesn’t work again. What’s the right way to send html message in the way as it type in the textarea?
You can use
htmentites()