-1

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

誰でもこの問題を解決するのを手伝ってもらえますか?

4

2 に答える 2

1
$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."\"";
于 2012-11-16T09:28:08.137 に答える
1
$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";
于 2012-11-16T09:28:45.380 に答える