duanjiu6697 2013-10-26 04:59
浏览 67
已采纳

邮件没有发送到PHP的CC

I am using

    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
);

Mail sent to $to but not sending to $cc

  • 写回答

1条回答 默认 最新

  • duanhui1185 2013-10-26 12:34
    关注

    List all envelope recipients ( "To", "Cc" and "Bcc") in the second parameter:

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

    My guess it that SendMessage expects to get all recipients in the second parameter.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序