1

我在用

    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

4

1 回答 1

4

在第二个参数中列出所有信封收件人(“To”、“Cc”和“Bcc”):

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

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

于 2013-10-26T12:34:20.813 回答