HTML in emails?
Posted: Thu Dec 25, 2003 1:15 pm
Hi all,
I am sending a html email using the mail() function. I can do this with no problem except.... when my user inputs the html using a form. Then it doesnt work(?)
My form code is this;
The processor mail function code looks like this...
The problem is that when my user pastes the html, the mail() function errors because of the speech marks (")
This does not happen when I paste the html into the script.
Any ideas?
Lawrence
I am sending a html email using the mail() function. I can do this with no problem except.... when my user inputs the html using a form. Then it doesnt work(?)
My form code is this;
Code: Select all
<head>
<title>Sender</title>
</head>
<body>
<form method="POST" action= "process_sender.php" >
<p>Email to:</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="278" id="table1">
<tr>
<td width="44"><input type="radio" value="all_verified" checked name="radio_but"></td>
<td>All Verified Subscribers</td>
</tr>
<tr>
<td width="44"><input type="radio" name="radio_but" value="non_verified"></td>
<td>Non Verified Subscribers</td>
</tr>
</table>
<p>Subject Line:&nbsp;
<input type="text" name="subject_line" size = "26" >
</p>
<p>Paste Email Here....</p>
<p><textarea rows="7" name="email_text" cols="32"></textarea></p>
<p><input type="checkbox" name="email_to_self" value="ON"> Send Test to Self!</p>
<p><input type="submit" value="Send" name="B1"><input type="reset" value="Reset" name="B2"></p>
<p>&nbsp;</p>
</form>
</body>
</html>Code: Select all
<?php
$success=mail($email, $subject_line, $email_text, $headers);
?>This does not happen when I paste the html into the script.
Any ideas?
Lawrence