在php邮件函数中包含cc

在php邮件函数中包含cc,php,html-email,email-formats,Php,Html Email,Email Formats,当我尝试使用php邮件函数插入cc时,我只收到带有HTML部分的消息 我正在使用下面的代码 $headers = "From:someone@gmail.com\r\n"; $headers .= "CC:test@gmail.com\r\n"; $headers .= "Content-type: text/html\r\n"; $to ="$x_email"; $subject ="Your Order Confirmation"; $b

当我尝试使用php邮件函数插入cc时,我只收到带有HTML部分的消息

我正在使用下面的代码

      $headers  = "From:someone@gmail.com\r\n";
      $headers .= "CC:test@gmail.com\r\n"; 
  $headers .= "Content-type: text/html\r\n"; 
  $to ="$x_email";
  $subject ="Your Order Confirmation";
      $bodyadmin=$messageadmin;
  $sentmail=mail($to, $subject, $bodyadmin, $headers);
有谁能帮我解决这个问题吗?

$headers='MIME版本:1.0'。“\r\n”;
$headers = "From: $from_email\r\nReply-To: $from_email";
$headers .= 'Cc: test@test.com\r\n';
$headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\"";
$headers.='内容类型:文本/html;字符集=iso-8859-1'。“\r\n”; //附加标题 $headers.='To:Mary,Kelly'。“\r\n”; $headers.=“发件人:生日提醒”。“\r\n”; $headers.='Cc:birthdayarchive@example.com' . “\r\n”; $headers.='密件抄送:birthdaycheck@example.com' . “\r\n”;
请您修改一下您的问题,使其有意义。你说你只得到HTML是什么意思?我想说CC是区分大小写的,必须是CC。你知道我的想法是否正确吗?
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";