0

这是我到目前为止所拥有的,现在订单正在作为确认发送,但我也将副本发送给我,我需要添加什么?

  $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,但它没有用任何建议都会很棒

4

2 回答 2

1

只需像这样放置 cc 一样放置 from:

$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);
于 2013-08-15T03:02:42.287 回答
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";
于 2013-08-15T03:04:21.767 回答