2013-06-12 5 views
1

다국어 문자를 포함하여 PHP로 전자 메일을 보내려고합니다. 전체 사이트 (html 헤더, PHP 헤더)는 UTF8뿐만 아니라 charset 형식으로 설정됩니다. 내가 지금 가지고있는 PHP 코드를mail()을 사용하여 UTF8 전자 메일 보내기

은 다음과 같습니다

$to = "[email protected]"; 
$subject = "Subject"; 
$message = "Question is ".$question; 
$from = "[email protected]"; 
$headers = "From:" . $from . "\r\n"; 
$headers .= 'Content-type: text/html; charset=iso-UTF-8' . "\r\n"; 

$sendmail = @mail($to,$subject,$message,$headers); 

나는 어디 선가 틀렸다 supose?

나는 '?' 시험을 위해 일본어 문자가있는 문자.

답변

1
$headers .= "MIME-Version: 1.0"."\r\n"; 
$headers .= "Content-type: text/html; charset=utf-8"."\r\n"; 

모두 필요합니다.

내가 틀릴 수도 있지만, 알고있는 한 iso-UTF-8은 유효한 문자 세트가 아닙니다.

+0

대단히 감사합니다. –

관련 문제