我想用CC发送邮件。电子邮件已成功发送,但未发送CC。
$to = 'abc@xyz.com';
$subject = 'Order Details of Order Number:'.$orderID;
$headers = "From: webmaster@xyz.com\r\nReply-To: webmaster@xyz.com";
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\"";
$message = "Test Message";
$headers .= 'Cc: def@xyz.com' . "\r\n";
mail($to, $subject, $message, $headers);
我将此邮件发送为HTML。
答案 0 :(得分:1)
添加标题如下,
outlineViewItemWillExpand(_:)
答案 1 :(得分:0)
尝试按以下顺序添加此代码:
$headers = "From: $from_email\r\nReply-To: $from_email";
$headers .= 'Cc: test@test.com\r\n';
$headers .= 'Bcc: test@test.com\r\n';
$headers .= "Return-Path: <info@premierinspectiontn.com>\r\n";
//add boundary string and mime type specification
$headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\"";