邮件未发送到 PHP 中的 CC


Mail not sending to CC in PHP

我正在使用

    require("smtp-mail/smtp.php");
    $from                       =   "abc@abcd.com";   
    $cc                     =   'test@test.com';
    $to                     =   'xyz@xyz.com';
    $smtp                       =   new smtp_class;
    $smtp->host_name            =   "localhost";
    $smtp->host_port            =   25;
    $smtp->ssl                  =   0;              
    $smtp->start_tls            =   0;              
    $smtp->localhost            =   "localhost";    
    $smtp->direct_delivery      =   0;              
    $smtp->timeout              =   10;             
    $smtp->data_timeout     =   0;             
    $smtp->debug                =   0;             
    $smtp->html_debug           =   0;             
    $smtp->pop3_auth_host       =   "";             
    $smtp->user             =   "";             
    $smtp->realm                =   "";             
    $smtp->password         =   "";             
    $smtp->workstation          =   "";             
    $smtp->authentication_mechanism="";
if($smtp->direct_delivery)
{
if(!function_exists("GetMXRR"))
{
    $_NAMESERVERS       =   array();
    include("smtp-mail/getmxrr.php");
}
}
$smtp->SendMessage
(
$from,
array($to),
array
(
"MIME-Version: 1.0",
"From: 'IndianMoney.com'<test@test.com>",
"Cc: $cc",
"Content-type: text/html; charset=iso-8859-1",
"To: $to",
"Subject:". $mailSubject,
"Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z")
),
$mailBody
);

发送给$to的邮件但不发送到$cc

在第二个参数中列出所有信封收件人("收件人"、"抄送"和"密件抄送"):

$smtp->SendMessage
(
$from,
array($to,$cc),
...

我猜SendMessage希望在第二个参数中获取所有收件人。