I'm trying to use PHP to send an HTML-formatted email message (since Outlook Express sends as multipart/alternative and with PHP I can set the header as html/text).
The problem is when I submit the message to the PHP script via a form (the only input is a textarea where I paste in the HTML), all the quotes, single quotes, etc. get escaped in the actual mailing, messing up all the HTML. How do I get it to send the message exactly as I pasted it into the text area?
Here's the script:
Here's the form:
$to = "email@example.com";
$subject = "test html php 3";
$headers = "From: [email]firstname.lastname@example.org[/email]\nMIME-Version: 1.0\nContent-Type: text/html; charset=us-ascii";
mail("$to", "$subject", "$msg", "$headers");
Please help. Thank you in advance!
<form action="testsend.php" method="post"><textarea name="msg" cols="30" rows="5"></textarea><br><input type="submit"></form>