RyanSF07 Posted October 6, 2007 Share Posted October 6, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/72048-send-email-sends-symbols-instead-of-accent-marks/ Share on other sites More sharing options...
darkfreaks Posted October 6, 2007 Share Posted October 6, 2007 <?php text = trim(strip_tags(array($_POST[first_name], $_POST[last_name], $_POST[user_name], $_POST[email], $_POST[link])));?> Quote Link to comment https://forums.phpfreaks.com/topic/72048-send-email-sends-symbols-instead-of-accent-marks/#findComment-363088 Share on other sites More sharing options...
slancasterfreak Posted October 6, 2007 Share Posted October 6, 2007 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); Quote Link to comment https://forums.phpfreaks.com/topic/72048-send-email-sends-symbols-instead-of-accent-marks/#findComment-363281 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.