Jump to content

"send email" sends symbols instead of accent marks


RyanSF07

Recommended Posts

Hi All,

 

I've been using a simple, plain text, "Send Email" script to let me know when a new member has registered on the site.

 

Recently people with accent marks in their names have been registering, but in place of the accent marks I see unrecognizable symbols.

 

I did some googling and found out that I should add something like:

"Content-Type: text/plain;charset=utf-8" to the header.

 

That didn't fix it..

 

Any ideas?

 

$recep = "[email protected]";
		$subject = "New Member";
		$text = "'$_POST[first_name]', '$_POST[last_name]', '$_POST[user_name]',
			'$_POST[email]', '$_POST[link]', 
		$headers =
		"X-Mailer: PHP\n" .
		"Content-Type: text/plain;charset=utf-8" .
		"Reply-to: [email protected]\n";
		mail($recep,$subject,$text,$headers);

 

All help appreciated.

Thank you,

Ryan

 

This is the email notice I use, it works good:

( I stripslash the variables first)

 

 

$headers2="Cc: [email protected]";	
$headers3="Bcc: [email protected]";		
$headers3.=", [email protected]";

$mymessage="Dear Admins, <ul><BR>
$fname $lname has just registered<br>
From $address $city $state $zip<br>
$useremail<BR><BR></ul>";

$from="[email protected]";
$mysubject="New User added";
$to="[email protected]";
$subject = $mysubject;
$message=$mymessage;
$headers1= 'MIME-Version: 1.0' . "\r\n";
$headers1.= 'Content-type: text/html; charset=iso-8859-1; Content-type: image/jpg' . "\r\n";
$headers='From: ' . $fromemail . "\r\n";
$headers.=$headers1 . $headers2 . "\r\n";  
$headers.=$headers3 . "\r\n";  
//Mail it
mail($to, $subject, $message, $headers);

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.