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 = "[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 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])));?> 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: [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); 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
Archived
This topic is now archived and is closed to further replies.