I have a smart text editor script on my website so I can email users about updates and I can edit the text, eg. Bold, underlined, basically like the stack overflow text area with all the options. I have it configured so that once I send it, it will add whatever I've written in the textarea into an email and send it to whoever I choose. Problem is the email then shows all of the
characters? Half of the email is script and it looks so unprofessional? Here are the codes, I'm wondering if there is a way to stop all of the codes from being shown in the email?
<textarea name="email_body" style="width: 540px; height: 200px;" required="required">
Enter email text here...
</textarea>
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js" </script> <script type="text/javascript">
//<![CDATA[
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
//]]>
</script>
// Let's mail all users!
$subject = $sub;
$message = "Dear $firstname
$body
http://basecentre.co.uk, please do not reply directly to this email...!";
mail($emails, $subject, $message, "From: BaseCentre Updates<admin@basecentre.co.uk>\nX-Mailer: PHP/" . phpversion());
The email sends well and everything works apart from it shows the code instead of initiates it? Any ideas? Thanks!