这是我到目前为止,现在订单是作为确认发送的,但我发送给我的副本以及我需要添加什么?
$EMAIL=mysql_result($resultt,$it,"EMAIL");
$to = $EMAIL;
$subject = "Florida Fields To Forks - Order Confirmation";
$message = "Thank for your order! You can check your order here: http://www.floridafieldstoforks.com/order.php?orderid=$orderid";
$from = "floridafieldstoforks@gmail.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?>
我添加了“cc,但它没有工作任何建议将是非常棒的
答案 0 :(得分:1)
就像你把这样的cc放在这样的地方:
$EMAIL=mysql_result($resultt,$it,"EMAIL");
$to = $EMAIL;
$subject = "Florida Fields To Forks - Order Confirmation";
$message = "Thank for your order! You can check your order here: http://www.floridafieldstoforks.com/order.php?orderid=$orderid";
$from = "floridafieldstoforks@gmail.com";
$headers = "From:" . $from;
$headers.= "\n"."Cc:" . $cc;
mail($to,$subject,$message,$headers);
答案 1 :(得分:0)
要做的几项改变。首先创建一个cc标头。然后将cc地址添加到$to
变量。
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'Cc: ccaddress@google.com';
$to = $to . ", ccaddress@gmail.com";