ldoozer Posted October 11, 2007 Share Posted October 11, 2007 I have a html order form which when submitted goes to a php page which sends the order to an email address in html formal rather than plain txt the headers i use to do this is: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; But When the email comes through i get a funny charactor in front of a pound sign: £20.00 Any one got any ideas why? Thanks ldoozer Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/ Share on other sites More sharing options...
MadTechie Posted October 11, 2007 Share Posted October 11, 2007 where is the £20.00, coming from ? database, post etc ? little more code please Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/#findComment-367022 Share on other sites More sharing options...
ldoozer Posted October 13, 2007 Author Share Posted October 13, 2007 the  is not coming from a db just from a form post. Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/#findComment-368662 Share on other sites More sharing options...
Rithiur Posted October 13, 2007 Share Posted October 13, 2007 This sounds like it could be because of some encoding problems. Is both the form page in UTF-8 and is the mail client reading the email as UTF-8? Also, make sure that the browser and mail client IS really using the character encoding. (because sometimes the clients may ignore character encoding) The reason it's displayed like that, is because the UTF-8 code in hex for pound sign is 0xC2 0xA3, which in Latin-1 charset translates into "£". Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/#findComment-368666 Share on other sites More sharing options...
redarrow Posted October 13, 2007 Share Posted October 13, 2007 post the full code intrested now? Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/#findComment-368668 Share on other sites More sharing options...
redarrow Posted October 13, 2007 Share Posted October 13, 2007 Use this it works always.... $to = 'bob@barnyard.com'; $subject = 'Wakeup bob!'; $message = '<b>yo</b>, whassup?'; $headers = "From: server@barnyard.com\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; // Send mail($to, $subject, $message, $headers); Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/#findComment-368669 Share on other sites More sharing options...
ldoozer Posted October 18, 2007 Author Share Posted October 18, 2007 Thanks all thats done the trick. Quote Link to comment https://forums.phpfreaks.com/topic/72746-solved-strange-charactor-when-sending-mail/#findComment-372697 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.