Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP send email script characterset

New Here ,
Nov 26, 2010 Nov 26, 2010

Hi all,

I'm using the following headers for a PHP send email script;

$headers='MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html;charset=iso-8859-1' . "\r\n";

$headers .= 'From: website name' . "\r\n";

However some of the characters are coming out unencoded in the email that is received, such as;

L\' Hôtel Belvédére

Can anyone tell me how I need to set the characterset in the header so this doesn't happen?

Thanks

TOPICS
Server side applications
370
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 27, 2010 Nov 27, 2010
LATEST

Change this:

$headers .= 'Content-type: text/html;charset=iso-8859-1' . "\r\n";

to this:

$headers .= 'Content-type: text/html;charset=utf-8' . "\r\n";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines