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

PHP send email script characterset

New Here ,
Nov 26, 2010 Nov 26, 2010

Copy link to clipboard

Copied

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

Views

368
Translate

Report

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

Copy link to clipboard

Copied

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";

Votes

Translate

Report

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