ilhan ilhan - 9 months ago 80
PHP Question

Slashes in HTML mail?

I'm trying to write an html mail sender but I have a problem, it shows slashes.

Part of my code:

<?php
$sender = $_REQUEST["sender"];
$to = $_REQUEST["to"];
$html = $_REQUEST["html"];
$send = $_REQUEST["send"];

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=' . $ce . "\r\n";

$headers .= 'To: ' . $to . "\r\n";
$headers .= 'From: ' . $sender . "\r\n";

mail($to, $title, $html, $headers);

?>

<form action="html.php" method="post">
Sender: <input type="text" name="sender" value="sender@example.com">
HTML content: <textarea cols="40" rows="5" name="html"></textarea>
<input type="submit" value="Send">
</form>


When I type an html code to the textare and send it to gmail, it show weird slashes. What mistake I'm making here?

Answer Source

Due to server configurations there is no way.