I have created a contact me page that uses CK Editor to edit the content of the mail. I am using xampp/ localhost to test the mail. I want the mail to be exactly like i edit it in the editor
For example the bold part in editor doesnot show up bold in the mail it is sent as
<strong>SOMETHING IN BOLD</strong>
How do i use CK editor or any other so that the mail is sent as
SOMETHING IN BOLD
and not as shown above.
Thank you.
HTML Code
<form action="upload.php" method="post" style="height:100%">
<input name="articleTitle" value="Title" maxlength="50"
id="articleTitle">
<textarea name="article-body">
Compose your article...
</textarea>
<script>
CKEDITOR.inline( 'article-body' );
</script>
<br>
<input name="senderName" type="text" value="Name" maxlength="50"
id="name" class="textBox">
<input name="senderEmail" value="Email address" maxlength="50"
id="email" class="textBox">
<input name="abtyou" value="About Yourself" maxlength="150"
id="abtyou" class="textBox">
<input type="submit" name="submit" class="button">
</form>
PHP Code
<?php
$thankYou="";
if(isset($_POST["submit"])) {
$recipient="zain.farid@live.com";
$subject="New Guest Post";
$sender=$_POST["senderName"];
$senderEmail=$_POST["senderEmail"];
$senderAbout=$_POST["abtyou"];
$message=$_POST["article-body"];
$title=$_POST["articleTitle"];
$mailBody="Name: $sender
Email: $senderEmail
About Sender: $senderAbout
Title: $title
$message";
mail($recipient, $subject, $mailBody, "From: $sender <$senderEmail>");
$thankYou="Thank you! Your post has been submitted.";
}
?>