您好我正在尝试使用以下邮件功能发送电子邮件,但我希望编码也显示西班牙语字符。我怎样才能使$email_body
显示它们处于现在状态不正常的状态:
$email_body = "body text";
$headers = 'From: ' . $m . "\r\n";
$headers .= 'Return-Path: ' . $m . "\r\n";
$headers .= 'MIME-Version: 1.0' ."\r\n";
$headers .= 'Content-Type: text/HTML; charset=ISO-8859-1' . "\r\n";
$headers .= 'Content-Transfer-Encoding: 8bit'. "\n\r\n";
mail($to,$email_subject,$email_body,$headers);
答案 0 :(得分:0)
好的添加以下行,现在它正在运行:$email_body = mb_convert_encoding($email_body, "ISO-8859-1","AUTO");