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 = "me@yahoo.com";
		$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: me@yahoo.com\n";
		mail($recep,$subject,$text,$headers);

 

All help appreciated.

Thank you,

Ryan

 

Link to comment
Share on other sites

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

( I stripslash the variables first)

 

 

$headers2="Cc: myemail@hearts.org";	
$headers3="Bcc: thisperson@hotmail.com";		
$headers3.=", thisotherperson@hotmail.com";

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

$from="myemail@hearts.org";
$mysubject="New User added";
$to="webmaster@hearts.org";
$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);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.