Jump to content

e-mailed form creates HTML problems


smc

Recommended Posts

Hello,

 

Basically I've got an email function. Here it is:

 

function send_email($full_name, $destinationemail, $subject, $message, $sender){
global $reject_title, $reject_author, $reject_id;
$mailto = '[email protected]' ;

$uself = 0;
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;

$name = "Eagle Eye 5 Network";

$messageproper =

	"Dear " . $full_name . ",\n\n".

	"The following message was sent via mass e-mail by " . $sender . ".\n" .
	"\n" .
	"Message:\n\n" .
	$message . "\n\n" .
	"-------------\n" .
	"\n" .
	"Thank you,\n\n" .
	"Eagle Eye 5 Network \n\n" .
	"\n" ;

mail($destinationemail, $subject, $messageproper,
"From: \"$name\" <$mailto>" . $headersep . "Reply-To: \"$name\" <$mailto>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
}

 

However when it e-mails it creates things like \" and " in the email. I've tried:

 

$messageraw = $_POST['message'];
$message = htmlspecialchars($messageraw);

 

but to no avail. Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/37068-e-mailed-form-creates-html-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.